/* Out of Office Modal Styles - PRO-16839, PRO-16843, PRO-16844 */

/* Modal Header */
.ooo-modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding: 24px 24px 18px 24px;
    margin-top: 10px;
}

.ooo-modal-header .bootstrap-dialog-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

/* Tabs */
.ooo-tabs {
    border-bottom: 1px solid #e0e0e0;
}

.ooo-tab-nav {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding: 0 20px;
}

.ooo-tab-nav > li > a {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border: none !important;
    border-radius: 0 !important;
    padding: 12px 16px;
    margin-right: 0;
    background: transparent !important;
}

.ooo-tab-nav > li > a:hover {
    color: #1a5276;
    background: transparent !important;
}

.ooo-tab-nav > li.active > a,
.ooo-tab-nav > li.active > a:hover,
.ooo-tab-nav > li.active > a:focus {
    color: #1a5276;
    font-weight: 600;
    border: none !important;
    border-bottom: 3px solid #e67e22 !important;
    background: transparent !important;
}

/* Modal Body */
.ooo-modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Empty State */
.ooo-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.ooo-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.ooo-empty-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Add Delegation Button */
.ooo-btn-add {
    background-color: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
}

.ooo-btn-add:hover {
    background-color: #15304d;
    color: #fff;
}

/* Form Sections */
.ooo-form-section {
    margin-bottom: 20px;
}

.ooo-section-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 400;
}

.ooo-field-label {
    font-size: 12px;
    color: #1a5276;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

/* Date Fields */
.ooo-date-field {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 12px;
    background: #fff;
}

.ooo-date-input {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: transparent !important;
}

.ooo-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #1a5276;
    font-size: 12px;
}

/* Select Field */
.ooo-select-field {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    max-width: 100%;
}

.ooo-select-input {
    border: none !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    padding: 10px 40px 10px 14px !important;
    height: auto !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent !important;
    width: 100%;
    cursor: pointer;
}

.ooo-select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #1a5276;
    font-size: 14px;
    pointer-events: none;
}

/* Checkboxes */
.ooo-checkbox-group {
    display: flex;
    gap: 30px;
}

.ooo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
}

.ooo-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #2e7d32;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid #ccc;
    border-radius: 4px;
    position: relative;
    background: #fff;
}

.ooo-checkbox-label input[type="checkbox"]:checked {
    background-color: #2e7d32;
    border-color: #2e7d32;
}

.ooo-checkbox-label input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.ooo-checkbox-text {
    font-size: 14px;
    color: #1a5276;
    font-weight: 500;
}

.ooo-checkbox-label input[type="checkbox"]:not(:checked) + .ooo-checkbox-text {
    color: #333;
}

/* Textarea */
.ooo-textarea {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.ooo-textarea:focus {
    border-color: #1a5276;
    box-shadow: none;
}

/* Read-only fields */
.ooo-readonly {
    background: #fff;
    pointer-events: none;
    padding: 12px 14px;
}

.ooo-readonly-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: block;
    line-height: 1.4;
}

/* Note display (read-only) */
.ooo-note-display {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: #333;
    background: #fff;
    min-height: 60px;
    line-height: 1.5;
}

/* Status Bar */
.ooo-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* Badges */
.ooo-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.ooo-badge-active {
    background-color: #2e7d32;
    color: #fff;
}

.ooo-badge-paused {
    background-color: transparent;
    color: #e67e22;
    border: 1px solid #e67e22;
}

.ooo-badge-upcoming {
    background-color: #1a5276;
    color: #fff;
}

/* Status Actions */
.ooo-status-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ooo-action-link {
    font-size: 13px;
    color: #555;
    text-decoration: underline;
    cursor: pointer;
}

.ooo-action-link:hover {
    color: #333;
}

.ooo-action-remove {
    color: #9b2c2c;
}

.ooo-action-separator {
    color: #ccc;
}

/* Footer */
.ooo-modal-footer {
    border-top: 1px solid #e5e5e5;
    padding: 15px 20px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ooo-btn-cancel {
    background: #fff;
    color: #1a5276;
    border: 1px solid #1a5276;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
}

.ooo-btn-cancel:hover {
    background: #f5f5f5;
    color: #1a5276;
}

.ooo-btn-save {
    background-color: #1a3a5c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
}

.ooo-btn-save:hover:not(:disabled) {
    background-color: #15304d;
    color: #fff;
}

.ooo-btn-save:disabled {
    background-color: #d5dce3;
    color: #8a9baa;
    cursor: not-allowed;
}

/* Delegated to me - Card List */
.ooo-delegated-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ooo-delegation-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.ooo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.ooo-card-delegator {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.ooo-card-dates {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.ooo-card-types {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.ooo-card-note {
    font-size: 13px;
    color: #555;
    font-style: italic;
    line-height: 1.4;
}

/* Datepicker z-index fix for modal */
.ui-datepicker {
    z-index: 10060 !important;
}

/* Delete Confirmation */
.ooo-delete-confirm {
    padding: 40px 30px;
    text-align: center;
}

.ooo-delete-content {
    max-width: 380px;
    margin: 0 auto;
}

.ooo-delete-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.ooo-delete-body {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
    margin-bottom: 24px;
}

.ooo-delete-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.ooo-delete-cancel-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    cursor: pointer;
}

.ooo-delete-cancel-link:hover {
    color: #333;
}

.ooo-btn-delete {
    background-color: #c0392b;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
}

.ooo-btn-delete:hover {
    background-color: #a93226;
    color: #fff;
}

/* Validation Error States */
.ooo-field-error {
    border-color: #c0392b !important;
}

.ooo-error-icon {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0392b;
    font-size: 14px;
    font-weight: bold;
}

.ooo-error-text {
    display: block;
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
    font-weight: 500;
}

.ooo-checkbox-group.ooo-field-error {
    border: 1px solid #c0392b;
    border-radius: 4px;
    padding: 8px;
}

/* Paused badge */
.ooo-badge-paused {
    background-color: transparent;
    color: #e67e22;
    border: 2px solid #e67e22;
    font-weight: 600;
}

/* Resume link style (blue/teal like Figma) */
.ooo-action-resume {
    color: #1a5276;
}

/* Admin Banner */
.ooo-admin-banner {
    background-color: #edf5fa;
    border-bottom: 1px solid #d0e8f5;
    padding: 14px 20px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ooo-admin-badge {
    display: inline-block;
    background-color: #1a5276;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.ooo-admin-text {
    font-size: 14px;
    color: #333;
}

.ooo-admin-username {
    color: #1a5276;
    font-weight: 600;
}

/* Close button - bordered square like Figma */
#oooModal .bootstrap-dialog-close-button .close {
    opacity: 1;
    font-size: 18px;
    font-weight: 400;
    color: #1a5276;
    width: 32px;
    height: 32px;
    border: 1px solid #1a5276;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

#oooModal .bootstrap-dialog-close-button .close:hover {
    background-color: #f0f4f8;
}

/* Modal content top spacing */
#oooModal .modal-content {
    padding-top: 8px;
}

/* Hide scrollbar in OOO popup iframe */
.ooo-popup-dialog .modal-body iframe {
    overflow: hidden !important;
    scrolling: no;
}

.ooo-popup-dialog .oc-modal-iframe-content {
    overflow: hidden !important;
}

/* Remove default Bootstrap modal-body padding so iframe is flush with dialog border */
.ooo-popup-dialog .modal-body {
    padding: 0;
}

/* Remove top margin on admin banner when inside popup so there is no gap below the title bar */
.ooo-popup-dialog .ooo-admin-banner {
    margin-top: 0;
}

/* Save button disabled state (class-based) */
.ooo-btn-save-disabled {
    background-color: #d5dce3;
    color: #8a9baa;
    cursor: default;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
}

/* Push down the popup header for OOO dialog */
.ooo-popup-dialog .modal-header {
    padding-top: 20px !important;
    padding-bottom: 10px !important;
}

.ooo-popup-dialog .bootstrap-dialog-title {
    font-size: 22px !important;
    font-weight: 600 !important;
}

/* Inline mode (profile tab) - full width date fields */
.oc-tabs-bordered-nav-right .ooo-container .ant-calendar-picker {
    width: 100% !important;
}

.oc-tabs-bordered-nav-right .ooo-container .ant-calendar-picker-input {
    width: 100% !important;
}

/* ===== OOO Banner - PRO-16859 ===== */

.ooo-banner {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 20px;
    font-size: 13px;
    position: relative;
    z-index: 999;
    box-sizing: border-box;
}

.ooo-banner-active {
    background-color: #e8f5e9;
    border-bottom: 1px solid #c8e6c9;
}

.ooo-banner-paused {
    background-color: #fff3e0;
    border-bottom: 1px solid #ffe0b2;
}

.ooo-banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    flex-shrink: 0;
}

.ooo-banner-active .ooo-banner-dot {
    background-color: #2e7d32;
}

.ooo-banner-paused .ooo-banner-dot {
    background-color: #e65100;
}

.ooo-banner-text {
    flex: 1;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ooo-banner-active .ooo-banner-text {
    color: #1b5e20;
}

.ooo-banner-paused .ooo-banner-text {
    color: #bf360c;
}

.ooo-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 16px;
}

.ooo-banner-action-link {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #1a5276;
    white-space: nowrap;
}

.ooo-banner-action-link:hover {
    text-decoration: underline;
    color: #15304d;
}

.ooo-banner-dismiss {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.ooo-banner-dismiss:hover {
    color: #333;
}
