/* ------------------------------------------------------------------
   Appointments layout (employee)
------------------------------------------------------------------ */

.eac-appointments-layout {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
    gap: 24px;
}

/* Single-column variant (used by standalone admin tables like Pending Inbounds). */
.eac-appointments-layout.eac-appointments-layout-single {
    grid-template-columns: 1fr;
}

@media (max-width: 960px) {
    .eac-appointments-layout {
        grid-template-columns: 1fr;
    }
}

/* Pending Inbounds: inline date editor inside the table */
.eac-pending-inbounds-wrapper .eac-inbound-date-input {
    width: 170px;
    max-width: 100%;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid #1f2937;
    background: transparent;
    color: inherit;
    font-size: 0.9rem;
}

.eac-wrapper.eac-theme-light .eac-pending-inbounds-wrapper .eac-inbound-date-input {
    border-color: #e5e7eb;
}

.eac-pending-inbounds-wrapper tr.is-busy {
    opacity: 0.6;
}

.eac-appointments-left,
.eac-appointments-right {
    min-width: 0;
}

/* Card shell – theme-neutral metrics */
.eac-appointments-layout .eac-card {
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.25);
    border: 1px solid transparent;
}

/* Dark theme cards */
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-card {
    background-color: #020617;
    border-color: #1f2937;
    color: #e5e7eb;
}

/* Light theme cards */
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-card {
    background-color: #ffffff;
    border-color: #e5e7eb;
    color: #111827;
}

/* Slight spacing between stacked cards on the left */
.eac-appointments-left .eac-card + .eac-card {
    margin-top: 16px;
}

/* Card header + titles */
.eac-appointments-layout .eac-card-header {
    margin-bottom: 10px;
}

.eac-appointments-layout .eac-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Subtitle text under card title */
.eac-appointments-layout .eac-card-subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
}

/* Sub-section headings inside cards (e.g., Pending / Denied) */
.eac-appointments-layout .eac-subheading {
    margin: 18px 0 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dark vs light colors for headings / subtitles */
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-card-title {
    color: #e5e7eb;
}
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-card-title {
    color: #111827;
}

.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-card-subtitle {
    color: #9ca3af;
}
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-card-subtitle {
    color: #6b7280;
}

.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-subheading {
    color: #d1d5db;
}
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-subheading {
    color: #374151;
}

/* Card body */
.eac-appointments-layout .eac-card-body {
    font-size: 0.85rem;
}

/* Table wrapper */
.eac-appointments-layout .eac-table-wrapper {
    margin-top: 6px;
    overflow-x: auto;
}

/* Tables inside cards */
.eac-appointments-layout .eac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

/* Header cells */
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-table th {
    text-align: left;
    font-weight: 500;
    background-color: #020617;
    color: #e5e7eb;
    border: 1px solid #374151;
}
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-table th {
    text-align: left;
    font-weight: 500;
    background-color: #f9fafb;
    color: #111827;
    border: 1px solid #e5e7eb;
}

/* Body cells */
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-table td {
    border: 1px solid #374151;
    color: #e5e7eb;
}
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-table td {
    border: 1px solid #e5e7eb;
    color: #111827;
}

/* "No appointments" row tint for denied table */
.eac-appointments-layout .eac-appointments-table-denied tbody tr.no-appointments td,
.eac-appointments-layout .eac-denied-table tbody tr.no-appointments td {
    color: #fca5a5;
}

/* ------------------------------------------------------------------
   Pending / Denied action buttons (Edit / Delete)
------------------------------------------------------------------ */

.eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn,
.eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn,
.eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    min-width: 80px;
    font-size: 0.8rem;
    border-radius: 999px;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
}

/* Slight spacing between buttons */
.eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn + .eac-icon-btn,
.eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn + .eac-icon-btn,
.eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn + .eac-icon-btn {
    margin-left: 6px;
}

/* Theme-aware button colors */
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn,
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn,
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn {
    background-color: #020617;
    border-color: #374151;
    color: #e5e7eb;
}

.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn,
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn,
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn:hover,
.eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn:hover,
.eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn:hover {
    transform: translateY(-1px);
}

/* Keep hover colors theme-aware */
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn:hover,
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn:hover,
.eac-wrapper.eac-theme-dark .eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn:hover {
    background-color: #111827;
}

.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-row-pending .eac-actions .eac-icon-btn:hover,
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-row-denied .eac-actions .eac-icon-btn:hover,
.eac-wrapper.eac-theme-light .eac-appointments-layout .eac-row-approved .eac-actions .eac-icon-btn:hover {
    background-color: #f3f4f6;
}

.eac-btn-icon {
    display: inline-block;
    line-height: 1;
}

/* Dashicons inside the pill action buttons */
.eac-appointments-layout .eac-actions .eac-icon-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.eac-btn-label {
    display: inline-block;
    line-height: 1;
}



/* ------------------------------------------------------------------
   Pending Appointment Requests (standalone [eac_pending_appointments])
------------------------------------------------------------------ */

.eac-appointments-table-pending th.eac-actions,
.eac-appointments-table-pending td.eac-actions {
    width: 200px;
    white-space: nowrap;
}

.eac-appointments-table-pending td.eac-actions .eac-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.eac-appointments-table-pending td.eac-actions .eac-icon-btn + .eac-icon-btn {
    margin-left: 6px;
}

.eac-wrapper.eac-theme-dark .eac-appointments-table-pending td.eac-actions .eac-icon-btn {
    background-color: #020617;
    border-color: #374151;
    color: #e5e7eb;
}

.eac-wrapper.eac-theme-light .eac-appointments-table-pending td.eac-actions .eac-icon-btn {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.eac-appointments-table-pending td.eac-actions .eac-icon-btn:hover {
    transform: translateY(-1px);
}

.eac-wrapper.eac-theme-dark .eac-appointments-table-pending td.eac-actions .eac-icon-btn:hover {
    background-color: #111827;
}

.eac-wrapper.eac-theme-light .eac-appointments-table-pending td.eac-actions .eac-icon-btn:hover {
    background-color: #f3f4f6;
}

.eac-appointments-table-pending td.eac-actions .eac-icon-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}


/* ------------------------------------------------------------------
   Create Event form (right card)
------------------------------------------------------------------ */

.eac-create-event-form .eac-form-row {
    margin-bottom: 12px;
}

/* Two-column grid rows (dates & times) */
.eac-create-event-form .eac-form-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    .eac-create-event-form .eac-form-row-grid {
        grid-template-columns: 1fr;
    }
}

.eac-create-event-form .eac-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
}

/* Optional label text next to End Date / End Time */
.eac-optional-label {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 4px;
}

/* Inputs / selects / textareas – colors picked up from global theme styles,
   so we only enforce layout here. */
.eac-create-event-form .eac-form-group input,
.eac-create-event-form .eac-form-group select,
.eac-create-event-form .eac-form-group textarea {
    width: 100%;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.85rem;
}

/* Locked times for Leave: visually indicate non-editable state */
.eac-create-event-form .eac-form-group input.eac-time-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form actions row */
.eac-create-event-form .eac-form-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon + label inside Create Event button */
.eac-create-event-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eac-create-event-btn .eac-create-icon {
    display: inline-block;
    font-size: 0.95rem;
}

/* Messages under the button */
.eac-form-message {
    font-size: 0.8rem;
}

.eac-msg-error {
    color: #fecaca;
}

.eac-msg-success {
    color: #bbf7d0;
}


/* ------------------------------------------------------------------
   Pending Inbounds – compact icon actions
------------------------------------------------------------------ */

.eac-pending-inbounds-table th.eac-actions,
.eac-pending-inbounds-table td.eac-actions {
    width: 120px;
    white-space: nowrap;
}

.eac-pending-inbounds-table .eac-actions .eac-icon-btn {
    min-width: 34px;
    padding: 4px 8px;
    font-size: 0.85rem;
}

.eac-pending-inbounds-table .eac-actions .eac-icon-btn + .eac-icon-btn {
    margin-left: 4px;
}


/* ------------------------------------------------------------------
   Pending Inbounds – More Info pill + modal
------------------------------------------------------------------ */

.eac-pending-inbounds-table .eac-inbound-more-info-cell {
    white-space: nowrap;
    text-align: left;
}

.eac-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    background: transparent;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.eac-pill-btn:hover {
    transform: translateY(-1px);
}

.eac-pill-btn:active {
    transform: translateY(0);
}

.eac-pill-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.eac-wrapper.eac-theme-dark .eac-pill-btn {
    border-color: #1f2937;
    color: #e5e7eb;
    background-color: #0b1220;
}

.eac-wrapper.eac-theme-dark .eac-pill-btn:hover {
    background-color: #111827;
}

.eac-wrapper.eac-theme-light .eac-pill-btn {
    border-color: #cbd5f5;
    color: #111827;
    background-color: #ffffff;
}

.eac-wrapper.eac-theme-light .eac-pill-btn:hover {
    background-color: #e5f0ff;
}

.eac-inbound-more-info-dialog {
    max-width: 640px;
}

.eac-inbound-more-info-dialog .eac-form-group select {
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #1f2937;
    background-color: #020617;
    color: #e5e7eb;
    font-size: 0.9rem;
}

.eac-wrapper.eac-theme-light .eac-inbound-more-info-dialog .eac-form-group select {
    background-color: #e5f0ff;
    border-color: #cbd5f5;
    color: #0f172a;
}

.eac-inbound-more-info-dialog .eac-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb33;
}


/* ------------------------------------------------------------------
   System notes (e.g., Leave workflow)
------------------------------------------------------------------ */

.eac-system-note {
    margin-top: 4px;
    font-size: 0.85rem;
    opacity: 0.85;
}
