/* Card-like Table Container */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: visible; /* Changed from hidden to visible to allow dropdown overflow */
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

/* Clean Table Styles - No Cell Borders */
.team-members-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    border-radius: 12px;
}

.team-members-table th,
.team-members-table td {
    padding: 16px 20px;
    text-align: left;
    border: none !important; /* Removed all borders */
}

.team-members-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef; /* Only bottom border for header */
}

.team-members-table th:first-child {
    border-top-left-radius: 12px;
}

.team-members-table th:last-child {
    border-top-right-radius: 12px;
}

.team-members-table tbody tr {
    transition: background-color 0.2s ease;
}

.team-members-table tbody tr:hover {
    background-color: #f8f9fa;
}

.team-members-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.team-members-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Fixed Dropdown Styles - Proper Overflow Handling */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 120px;
    transition: background-color 0.2s ease;
}

.dropdown-toggle:hover {
    background-color: #0056b3;
}

.dropdown-toggle .caret {
    margin-left: 8px;
    font-size: 10px;
}

.dropdown-menu {
    position: absolute; /* ← instead of fixed */
    top: 100%;
    left: 0;
    display: none;
    background-color: white;
    min-width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 99999; /* Very high z-index */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    max-height: 400px;
    overflow-y: auto;
}
.dropdown-menu.show{
    display:block !important;
}
/*.dropdown:hover .dropdown-menu {*/
/*    display: block;*/
/*}*/

/*.dropdown.show .dropdown-menu {*/
/*    display: block;*/
/*}*/

/* Position dropdown menu properly */
/*.dropdown-toggle:hover + .dropdown-menu,*/
/*.dropdown-menu:hover {*/
/*    display: block;*/
/*}*/

.dropdown-heading {
    padding: 12px 16px;
    font-weight: 600;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
}

.dropdown-item {
    color: #495057;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
    font-size: 18px;
    border: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

.delete-item {
    color: #dc3545;
}

.delete-item:hover {
    background-color: #f8d7da;
    color: #721c24;
}

.on-demand-course-btn.disable {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}


/* Simple Popup Styles */
#acethetest-buy-for-user-popup,
#delete-confirmation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.popup-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
}

.popup-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
    gap: 10px;
}

.edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    background-color: #0056b3;
    transition: background-color 0.2s ease;
}

.edit-link:hover {
    background-color: #004494;
}

.edit-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.edit-link:active {
    background-color: #003d80;
}

.edit-link span {
    color: white;
    font-size: 18px;
    line-height: 1;
}


.popup-actions button,
.popup-actions .button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.popup-actions button {
    background-color: #6c757d;
    color: white;
}

.popup-actions button:hover {
    background-color: #545b62;
}

.popup-actions .button {
    background-color: #007bff;
    color: white;
}

.popup-actions .button:hover {
    background-color: #0056b3;
}

.popup-actions .delete-button:hover {
    background-color: white !important;
    color: #dc3545;
    border-color: #dc3545;
}


.popup-actions .delete-button {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.popup-actions .delete-button:hover {
    background-color: #c82333;
}

/* On Demand Course Popup Styles */
.on-demand-course-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.on-demand-course-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.on-demand-course-popup {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.on-demand-course-overlay.active .on-demand-course-popup {
    transform: scale(1);
    opacity: 1;
}

.on-demand-course-header {
    background: #007bff;
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.on-demand-course-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.on-demand-course-header p {
    opacity: 0.9;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.on-demand-course-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    padding: 10px !important;
    margin: 10px !important;
    color: white;
    font-size: 1.5rem !important;
    cursor: pointer;
    transition: transform 0.3s;
}

.on-demand-course-content {
    padding: 20px;
}

.on-demand-course-step {
    display: none;
}

.on-demand-course-step.active {
    display: block;
}

.on-demand-course-footer {
    border-top: 1px solid #eee;
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
    border-radius: 0 0 12px 12px;
}

/* Price Summary */
.on-demand-course-price-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.on-demand-course-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.on-demand-course-price-row.total {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
}

/* Button Styles */
.on-demand-course-actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

.on-demand-course-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.on-demand-course-btn-primary {
    background-color: #007bff;
    color: white;
}

.on-demand-course-btn-primary:hover {
    background-color: #0056b3;
}

/* Success Message */
.on-demand-course-success {
    text-align: center;
    padding: 30px 20px;
}

.on-demand-course-success-icon {
    width: 60px;
    height: 60px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

.on-demand-course-success h3 {
    color: #495057;
    margin-bottom: 10px;
}

.on-demand-course-success p {
    color: #6c757d;
}

/* Card Element Styling */
#card-element {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    margin-bottom: 15px;
}

#card-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
}

.form-error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
}

/* Loading Animation */
.dashicons.dashicons-update {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.form-header h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* Form Styles */
.member-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

/* Form Rows */
.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group-spacer {
    flex: 1; /* Takes up space but remains empty */
}

/* Labels */
.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.required {
    color: #dc2626;
}

/* Input Fields */
.form-group input {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:disabled {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Field Notes */
.field-note {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .member-form-container {
        padding: 1rem;
    }

    .member-form {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group-spacer {
        display: none;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .form-header h3 {
        font-size: 1.5rem;
    }
}

/* Input Validation States */
.form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Focus States for Better Accessibility */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Progress Container */
.progress-container {
    margin: 10px auto 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Progress Header */
.progress-header {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.user-details h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.user-details p {
    margin: 0;
    color: #6b7280;
    font-size: 1rem;
}

/* Section Styles */
.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-header svg {
    color: #3b82f6;
}

.section-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

/* Grid Layouts */
.courses-grid,
.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

/* Course Cards */
.course-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.course-header h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    margin-right: 1rem;
}

.progress-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.course-progress {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Booking Cards */
.booking-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.booking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.booking-header h5 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    margin-right: 1rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-completed {
    background: #dbeafe;
    color: #1e40af;
}

/* Booking Details */
.booking-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.detail-item svg {
    color: #9ca3af;
    flex-shrink: 0;
}

.detail-item strong {
    color: #1f2937;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.empty-state svg {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin: 2rem auto;
    max-width: 600px;
}

.error-message svg {
    color: #dc2626;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-container {
    }

    .progress-header {
        padding: 1.5rem;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }

    .courses-grid,
    .bookings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .course-header,
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .progress-badge,
    .status-badge {
        align-self: flex-start;
    }
}

/* Animation for progress bars */
@keyframes progressAnimation {
    from {
        width: 0%;
    }
}

.progress-fill {
    animation: progressAnimation 1s ease-out;
}