/* ===== PROFESSOR SCHEDULE - MINIMAL STYLING ===== */
/* Clean, modern design system using Bootstrap */
/* Variables ONLY apply to plugin pages with .prof-admin-wrap or .prof-schedule-wrapper */

.prof-admin-wrap,
.prof-schedule-wrapper {
    /* Colors - Consistent with design */
    --prof-primary: #9b3b21;
    --prof-primary-hover: #7a2b19;
    --prof-success: #8a9b5f;
    --prof-danger: #7a1e1e;
    --prof-warning: #d4cb86;
    --prof-info: #c48c71;
    --prof-secondary: #c48c71;

    /* Neutrals */
    --prof-bg: #ffffff;
    --prof-bg-light: #f0eed6;
    --prof-bg-lighter: #e8e1be;
    --prof-border: #dbb6a1;
    --prof-border-light: #e8e1be;
    --prof-text: #3a2817;
    --prof-text-secondary: #8b6f47;

    /* Spacing */
    --prof-gap: 15px;
    --prof-padding: 1rem;
    --prof-radius: 10px;

    /* Shadows */
    --prof-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --prof-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --prof-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --prof-transition: all 0.25s ease;
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--prof-text);
}

* {
    box-sizing: border-box;
}

/* ===== ADMIN WRAP - Plugin Pages ===== */
.prof-admin-wrap,
.prof-schedule-wrapper {
    background-color: var(--prof-bg-lighter);
    min-height: 100vh;
    padding: 20px;
    max-width: none !important;
}

/* Remove any max-width restrictions on cards */
.wrap.prof-admin-wrap {
    max-width: none !important;
    width: 100% !important;
}

.card {
    max-width: none !important;
}

.card-body {
    max-width: none !important;
}

.prof-admin-header,
.prof-schedule-header {
    background: linear-gradient(135deg, var(--prof-primary) 0%, var(--prof-secondary) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--prof-radius);
    margin-bottom: 30px;
    text-align: center;
}

.prof-admin-title,
.prof-schedule-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.prof-admin-subtitle,
.prof-schedule-header .description {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* ===== FORMS - Using Bootstrap classes ===== */
/* Input styling unified */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="time"],
input[type="number"],
select,
textarea {
    padding: 12px 14px !important;
    border: 1px solid var(--prof-border) !important;
    border-radius: var(--prof-radius) !important;
    font-size: 15px !important;
    color: var(--prof-text) !important;
    background-color: var(--prof-bg-light) !important;
    transition: var(--prof-transition) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--prof-text-secondary) !important;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #c48c71 !important;
    background: #f0eed6 !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--prof-info) !important;
    background: #f0eed6 !important;
    box-shadow: 0 0 0 4px rgba(196, 140, 113, 0.25) !important;
}

/* Select dropdown custom styling */
select {
    cursor: pointer;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c48c71' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 40px !important;
}

/* Textarea */
textarea {
    resize: vertical;
    min-height: 100px;
}

/* Disabled inputs and checkboxes */
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f5f5f5 !important;
    border-color: #d9d9d9 !important;
    color: #999999 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

input[type="checkbox"]:disabled {
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* Style labels containing disabled checkboxes */
label:has(input[type="checkbox"]:disabled) {
    opacity: 0.6;
    cursor: not-allowed !important;
}

label:has(input[type="checkbox"]:disabled):hover {
    opacity: 0.6;
}

/* ===== FLATPICKR CUSTOMIZATION (for planning page) ===== */
.flatpickr-calendar {
    border-radius: var(--prof-radius) !important;
    box-shadow: var(--prof-shadow-lg) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    border: 1px solid var(--prof-border-light) !important;
}

.flatpickr-time {
    background-color: var(--prof-bg-light) !important;
    border-radius: var(--prof-radius) !important;
    border-top: 1px solid var(--prof-border-light) !important;
}

.flatpickr-time input,
.flatpickr-time input.numInput {
    border-radius: 8px !important;
    font-size: 15px !important;
    color: var(--prof-text) !important;
    background-color: var(--prof-bg) !important;
    border: 1px solid var(--prof-border) !important;
}

.flatpickr-time input:focus,
.flatpickr-time input.numInput:focus {
    border-color: var(--prof-info) !important;
    background-color: #f0eed6 !important;
}

.flatpickr-current-month {
    color: var(--prof-text) !important;
    font-weight: 600 !important;
}

.flatpickr-weekday {
    color: var(--prof-text-secondary) !important;
    font-weight: 600 !important;
}

.flatpickr-day {
    color: var(--prof-text) !important;
    border-radius: 6px !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: #f0eed6 !important;
    border-color: var(--prof-info) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--prof-info) !important;
    border-color: var(--prof-info) !important;
    color: white !important;
}

/* ===== SHORTCODES STYLES ===== */
/* General grid */
.prof-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.prof-schedule-card {
    background: var(--prof-bg);
    border: 1px solid var(--prof-border-light);
    border-radius: var(--prof-radius);
    padding: 20px;
    box-shadow: var(--prof-shadow-sm);
    transition: var(--prof-transition);
}

.prof-schedule-card:hover {
    box-shadow: var(--prof-shadow-md);
}

/* Compact table styles */
.prof-schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.prof-schedule-table th {
    background: var(--prof-bg-lighter);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--prof-border);
}

.prof-schedule-table td {
    padding: 12px;
    border-bottom: 1px solid var(--prof-border-light);
}

.prof-schedule-table tbody tr:hover {
    background: var(--prof-bg-light);
}

/* ===== BOOTSTRAP TABLE OVERRIDES FOR DESKTOP ===== */
/* Make tables wider and more spacious on desktop */
@media (min-width: 992px) {
    .table {
        font-size: 14px;
        margin-bottom: 0;
        table-layout: fixed;
        width: 100%;
    }

    .table th {
        padding: 12px 15px;
        font-weight: 600;
        vertical-align: middle;
        border-bottom: 2px solid var(--prof-border);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .table td {
        padding: 12px 15px;
        vertical-align: middle;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .table tbody tr:hover {
        background-color: var(--prof-bg-light);
    }

    /* Specific column widths for teachers table */
    .table-teachers th:nth-child(1),
    .table-teachers td:nth-child(1) {
        width: 20%;
    }

    .table-teachers th:nth-child(2),
    .table-teachers td:nth-child(2) {
        width: 25%;
    }

    .table-teachers th:nth-child(3),
    .table-teachers td:nth-child(3) {
        width: 20%;
    }

    .table-teachers th:nth-child(4),
    .table-teachers td:nth-child(4) {
        width: 20%;
    }

    .table-teachers th:nth-child(5),
    .table-teachers td:nth-child(5) {
        width: 15%;
        text-align: center;
    }

    /* Specific column widths for subjects table (3 columns) */
    .table-subjects th:nth-child(1),
    .table-subjects td:nth-child(1) {
        width: 25%;
    }

    .table-subjects th:nth-child(2),
    .table-subjects td:nth-child(2) {
        width: 60%;
    }

    .table-subjects th:nth-child(3),
    .table-subjects td:nth-child(3) {
        width: 15%;
        text-align: center;
    }

    /* Specific column widths for locations table (4 columns) */
    .table-locations th:nth-child(1),
    .table-locations td:nth-child(1) {
        width: 10%;
    }

    .table-locations th:nth-child(2),
    .table-locations td:nth-child(2) {
        width: 25%;
    }

    .table-locations th:nth-child(3),
    .table-locations td:nth-child(3) {
        width: 50%;
    }

    .table-locations th:nth-child(4),
    .table-locations td:nth-child(4) {
        width: 15%;
        text-align: center;
    }

    /* Specific column widths for classes table (4 columns) */
    .table-classes th:nth-child(1),
    .table-classes td:nth-child(1) {
        width: 40%;
    }

    .table-classes th:nth-child(2),
    .table-classes td:nth-child(2) {
        width: 20%;
    }

    .table-classes th:nth-child(3),
    .table-classes td:nth-child(3) {
        width: 25%;
    }

    .table-classes th:nth-child(4),
    .table-classes td:nth-child(4) {
        width: 15%;
        text-align: center;
    }

    /* Specific column widths for teaching types table (4 columns) */
    .table-teaching-types th:nth-child(1),
    .table-teaching-types td:nth-child(1) {
        width: 10%;
    }

    .table-teaching-types th:nth-child(2),
    .table-teaching-types td:nth-child(2) {
        width: 25%;
    }

    .table-teaching-types th:nth-child(3),
    .table-teaching-types td:nth-child(3) {
        width: 50%;
    }

    .table-teaching-types th:nth-child(4),
    .table-teaching-types td:nth-child(4) {
        width: 15%;
        text-align: center;
    }

    /* Make action buttons group more compact */
    .btn-group-compact {
        display: flex;
        gap: 8px;
    }

    /* Ensure table responsive wrapper doesn't cause overflow */
    .table-responsive {
        overflow-x: visible !important;
    }
}

/* ===== MEDIA QUERIES FOR RESPONSIVE ===== */
@media (max-width: 768px) {
    .prof-admin-title {
        font-size: 1.5rem;
    }

    .prof-admin-subtitle {
        font-size: 0.9rem;
    }

    .prof-schedule-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== BUTTON STYLING FOR PLUGIN ===== */
.prof-admin-wrap .btn-primary,
.prof-schedule-wrapper .btn-primary {
    background-color: var(--prof-primary);
    border-color: var(--prof-primary);
    color: white;
}

.prof-admin-wrap .btn-primary:hover,
.prof-schedule-wrapper .btn-primary:hover {
    background-color: var(--prof-primary-hover);
    border-color: var(--prof-primary-hover);
    color: white;
}

.prof-admin-wrap .btn-primary:focus,
.prof-schedule-wrapper .btn-primary:focus {
    background-color: var(--prof-primary-hover);
    border-color: var(--prof-primary-hover);
    box-shadow: 0 0 0 0.2rem rgba(155, 59, 33, 0.25);
}

.prof-admin-wrap .btn-success,
.prof-schedule-wrapper .btn-success {
    background-color: var(--prof-success);
    border-color: var(--prof-success);
    color: white;
}

.prof-admin-wrap .btn-success:hover,
.prof-schedule-wrapper .btn-success:hover {
    background-color: #7a8b4f;
    border-color: #7a8b4f;
    color: white;
}

.prof-admin-wrap .btn-danger,
.prof-schedule-wrapper .btn-danger {
    background-color: var(--prof-danger);
    border-color: var(--prof-danger);
    color: white;
}

.prof-admin-wrap .btn-danger:hover,
.prof-schedule-wrapper .btn-danger:hover {
    background-color: #5a0e0e;
    border-color: #5a0e0e;
    color: white;
}

/* Outline buttons */
.prof-admin-wrap .btn-outline-primary,
.prof-schedule-wrapper .btn-outline-primary {
    color: var(--prof-primary);
    border-color: var(--prof-primary);
}

.prof-admin-wrap .btn-outline-primary:hover,
.prof-schedule-wrapper .btn-outline-primary:hover {
    background-color: var(--prof-primary);
    border-color: var(--prof-primary);
    color: white;
}

/* Badges */
.prof-admin-wrap .badge.bg-info,
.prof-schedule-wrapper .badge.bg-info {
    background-color: var(--prof-info) !important;
    color: white;
}

.prof-admin-wrap .badge.bg-success,
.prof-schedule-wrapper .badge.bg-success {
    background-color: var(--prof-success) !important;
    color: white;
}

.prof-admin-wrap .badge.bg-danger,
.prof-schedule-wrapper .badge.bg-danger {
    background-color: var(--prof-danger) !important;
    color: white;
}

.prof-admin-wrap .badge.bg-warning,
.prof-schedule-wrapper .badge.bg-warning {
    background-color: var(--prof-warning) !important;
    color: var(--prof-text);
}

.prof-admin-wrap .badge.bg-primary,
.prof-schedule-wrapper .badge.bg-primary {
    background-color: var(--prof-primary) !important;
    color: white;
}

.prof-admin-wrap .badge.bg-secondary,
.prof-schedule-wrapper .badge.bg-secondary {
    background-color: var(--prof-secondary) !important;
    color: white;
}

.prof-admin-wrap .badge.bg-light,
.prof-schedule-wrapper .badge.bg-light {
    background-color: var(--prof-bg-light) !important;
    color: var(--prof-text);
}

/* WordPress buttons */
.prof-admin-wrap .button.button-primary,
.prof-schedule-wrapper .button.button-primary {
    background-color: var(--prof-primary) !important;
    border-color: var(--prof-primary) !important;
    color: white !important;
}

.prof-admin-wrap .button.button-primary:hover,
.prof-schedule-wrapper .button.button-primary:hover {
    background-color: var(--prof-primary-hover) !important;
    border-color: var(--prof-primary-hover) !important;
}

.prof-admin-wrap .button.button-secondary,
.prof-schedule-wrapper .button.button-secondary {
    background-color: var(--prof-secondary) !important;
    border-color: var(--prof-secondary) !important;
    color: white !important;
}

.prof-admin-wrap .button.button-secondary:hover,
.prof-schedule-wrapper .button.button-secondary:hover {
    background-color: #a97255 !important;
    border-color: #a97255 !important;
}

/* Text color utilities */
.prof-admin-wrap .text-primary,
.prof-schedule-wrapper .text-primary {
    color: var(--prof-primary) !important;
}

.prof-admin-wrap .text-secondary,
.prof-schedule-wrapper .text-secondary {
    color: var(--prof-secondary) !important;
}

.prof-admin-wrap .text-success,
.prof-schedule-wrapper .text-success {
    color: var(--prof-success) !important;
}

.prof-admin-wrap .text-danger,
.prof-schedule-wrapper .text-danger {
    color: var(--prof-danger) !important;
}

.prof-admin-wrap .text-warning,
.prof-schedule-wrapper .text-warning {
    color: var(--prof-warning) !important;
}

.prof-admin-wrap .text-info,
.prof-schedule-wrapper .text-info {
    color: var(--prof-info) !important;
}

/* ===== UTILITY CLASSES ===== */
.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.text-muted {
    color: var(--prof-text-secondary);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.justify-content-end {
    justify-content: flex-end;
}

.justify-content-center {
    justify-content: center;
}

/* Teachers List Shortcode [liste-enseignants] - Thim EKit Team Style */
.thim-ekit-team {
    padding: 0;
    margin: 0;
}

.thim-ekit-team__inner {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 35px !important;
    width: 100% !important;
}

.thim-ekit-team__article {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.thim-ekit-team__article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.thim-ekit-team__content {
    padding: 25px 20px !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    flex: 1 !important;
    transition: background-color 0.3s ease, border-color 0.3s ease !important;
}

.thim-ekit-team__article:hover .thim-ekit-team__content {
    background: #f9f9f9;
    border-color: #d0d0d0;
}

.thim-ekit-team__member-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    display: block;
    word-break: break-word;
}

.thim-ekit-team__member-position {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-style: italic;
}

.thim-ekit-team__member-description {
    font-size: 12px;
    color: #999;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.thim-ekit-team__member-description a {
    color: #9b3b21;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.thim-ekit-team__member-description a:hover {
    color: #c0512e;
    text-decoration: underline;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .thim-ekit-team__inner {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .thim-ekit-team__inner {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .thim-ekit-team__content {
        padding: 20px 15px;
    }

    .thim-ekit-team__member-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .thim-ekit-team__inner {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .thim-ekit-team__content {
        padding: 15px 12px;
    }

    .thim-ekit-team__member-name {
        font-size: 14px;
    }

    .thim-ekit-team__member-position {
        font-size: 12px;
    }
}

/* Teachers Invisible Table - [corps-enseignant] shortcode */
.apm-teachers-invisible-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    margin: 0;
    padding: 0;
    background: transparent;
}

.apm-teachers-invisible-table td {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.apm-teacher-row .apm-teacher-name {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    padding-top: 15px;
    padding-bottom: 5px;
    display: block;
}

.apm-teacher-title {
    font-size: 13px;
    color: #666;
    font-style: italic;
    padding-bottom: 2px;
}

.apm-teacher-email {
    font-size: 12px;
    padding-left: 20px;
    padding-bottom: 10px;
}

.apm-teacher-email a {
    color: #9b3b21;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apm-teacher-email a:hover {
    color: #c0512e;
    text-decoration: underline;
}

.apm-teacher-spacer {
    height: 15px;
}

.apm-teacher-spacer td {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    height: 15px;
}

/* Elementor Thim EKit Team Widget - Vertical List with Spacing */
.thim-ekit-team-default .thim-ekit-team__inner,
.elementor-widget-shortcode .thim-ekit-team__inner {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.thim-ekit-team-default .thim-ekit-team__article,
.elementor-widget-shortcode .thim-ekit-team__article {
    display: block !important;
    margin-bottom: 60px !important;
    padding: 0 !important;
}

.thim-ekit-team-default .thim-ekit-team__content,
.elementor-widget-shortcode .thim-ekit-team__content {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    gap: 5px !important;
}

.thim-ekit-team-default .thim-ekit-team__member-name,
.elementor-widget-shortcode .thim-ekit-team__member-name {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #333 !important;
    margin-bottom: 5px !important;
    display: block !important;
}

.thim-ekit-team-default .thim-ekit-team__member-position,
.elementor-widget-shortcode .thim-ekit-team__member-position {
    font-size: 13px !important;
    color: #666 !important;
    font-style: italic !important;
    display: block !important;
    margin-bottom: 2px !important;
    margin-left: 0 !important;
}

.thim-ekit-team-default .thim-ekit-team__member-description,
.elementor-widget-shortcode .thim-ekit-team__member-description {
    font-size: 12px !important;
    color: #999 !important;
    display: block !important;
}

/* === APM Independent Teacher List Styling === */
/* These classes are completely independent from thim-ekit-team and Elementor */

.apm-teachers-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.apm-teacher-item {
    display: block !important;
    padding: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.apm-teacher-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
}

.apm-teacher-name {
    font-weight: 900 !important;
    font-size: 16px !important;
    color: #000 !important;
    margin-bottom: 8px !important;
    display: block !important;
    line-height: 1.4 !important;
}

.apm-teacher-title {
    font-size: 13px !important;
    color: #666 !important;
    font-style: italic !important;
    display: block !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.apm-teacher-email,
.apm-teacher-phone {
    font-size: 12px !important;
    color: #666 !important;
    display: block !important;
    margin-bottom: 4px !important;
    line-height: 1.4 !important;
}

.apm-teacher-email a,
.apm-teacher-phone a {
    color: #0073aa !important;
    text-decoration: none !important;
}

.apm-teacher-email a:hover,
.apm-teacher-phone a:hover {
    color: #005a87 !important;
    text-decoration: underline !important;
}

/* === Form Checkbox Alignment Fix === */
.form-check {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.form-check-input {
    vertical-align: middle !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
}
