/**
 * Team Attendees Viewer - Frontend CSS
 *
 * These styles are loaded separately from Cornerstone's TSS
 * to ensure they apply to AJAX-loaded content.
 *
 * @package Nubbernaut_Kidwind
 * @since 1.3.0
 */

/* Section Title */
.nkw-team-attendees-viewer .nkw-tav-section-title {
    font-size: 1.5em;
    font-weight: 600;
    color: rgba(77, 64, 178, 1);
    margin: 0 0 1em;
    text-align: center;
}

/* Attendees Section */
.nkw-team-attendees-viewer .nkw-tav-attendees-section {
    text-align: center;
}

/* Table Wrapper */
.nkw-team-attendees-viewer .nkw-tav-table-wrapper {
    margin-bottom: 1.5em;
    overflow-x: auto;
    display: flex;
    justify-content: center;
}

/* Attendees Table */
.nkw-team-attendees-viewer .nkw-tav-table {
    border-collapse: collapse;
    background: #fff;
    border: 1px solid rgba(77, 64, 178, 0.3);
}

.nkw-team-attendees-viewer .nkw-tav-table th {
    padding: 0.5em 1.5em;
    color: rgba(77, 64, 178, 1);
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(77, 64, 178, 0.3);
}

.nkw-team-attendees-viewer .nkw-tav-table td {
    padding: 0.35em 1.5em;
    color: rgba(77, 64, 178, 1);
    text-align: center;
    border: 1px solid rgba(77, 64, 178, 0.3);
}

/* Action Buttons Container */
.nkw-team-attendees-viewer .nkw-tav-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75em;
    margin-top: 1.5em;
}

/* Action Buttons - coral/pink rounded style */
.nkw-team-attendees-viewer .nkw-tav-actions .nkw-tav-btn-secondary {
    display: inline-block;
    padding: 0.75em 2em;
    border-radius: 2em;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: rgba(255, 101, 132, 1);
    color: #fff;
}

.nkw-team-attendees-viewer .nkw-tav-actions .nkw-tav-btn-secondary:hover {
    background: rgba(230, 81, 112, 1);
    color: #fff;
    text-decoration: none;
}

/* Empty State */
.nkw-team-attendees-viewer .nkw-tav-empty {
    padding: 2em;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px dashed #ccc;
}

/* Error Message */
.nkw-team-attendees-viewer .nkw-tav-error {
    padding: 0.75em 1em;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 500;
}

.nkw-team-attendees-viewer .nkw-tav-error-container {
    padding: 2em;
    text-align: center;
}

.nkw-team-attendees-viewer .nkw-tav-error-message {
    color: #dc2626;
    margin: 0;
}

/* Password Section */
.nkw-team-attendees-viewer .nkw-tav-password-section {
    text-align: center;
}

/* Form - inline layout */
.nkw-team-attendees-viewer .nkw-tav-form,
div.nkw-team-attendees-viewer .nkw-tav-form,
[class*="nkw-team-attendees-viewer"] .nkw-tav-form {
    display: block !important;
}

.nkw-team-attendees-viewer .nkw-tav-form-row,
div.nkw-team-attendees-viewer .nkw-tav-form-row,
.nkw-team-attendees-viewer .nkw-tav-password-section .nkw-tav-form-row,
div.nkw-tav-form-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
}

.nkw-team-attendees-viewer .nkw-tav-label,
div.nkw-team-attendees-viewer .nkw-tav-form-row .nkw-tav-label,
.nkw-tav-form-row .nkw-tav-label,
label.nkw-tav-label {
    display: inline-block !important;
    flex-shrink: 0 !important;
    font-weight: 500;
    color: rgba(77, 64, 178, 1);
    font-size: 1em;
    white-space: nowrap;
}

.nkw-team-attendees-viewer .nkw-tav-input,
input.nkw-tav-input {
    display: inline-block !important;
    flex-shrink: 1 !important;
    padding: 0.5em 0.75em;
    border: 1px solid #ccc;
    font-size: 1em;
    font-family: inherit;
    background: #fff;
    min-width: 150px;
}

.nkw-team-attendees-viewer .nkw-tav-input:focus {
    outline: none;
    border-color: #999;
}

/* Description - below form in italics */
.nkw-team-attendees-viewer .nkw-tav-description {
    color: #666;
    margin: 0.75em 0 0;
    font-style: italic;
    font-size: 0.9em;
}

/* Submit Button (password form) */
.nkw-team-attendees-viewer .nkw-tav-btn-primary,
button.nkw-tav-btn-primary {
    display: inline-block !important;
    flex-shrink: 0 !important;
    padding: 0.5em 1em;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    background: #f5f5f5;
    border: 1px solid #ccc;
    color: inherit;
    white-space: nowrap;
}

.nkw-team-attendees-viewer .nkw-tav-btn-primary:hover {
    background: #e5e5e5;
}

.nkw-team-attendees-viewer .nkw-tav-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.nkw-team-attendees-viewer .nkw-tav-loading {
    opacity: 0.6;
    pointer-events: none;
}

.nkw-team-attendees-viewer .nkw-tav-btn-loading::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.5em;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: nkw-tav-spin 0.6s linear infinite;
}

@keyframes nkw-tav-spin {
    to { transform: rotate(360deg); }
}

/* Authorization Loading Overlay */
.nkw-team-attendees-viewer .nkw-tav-auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em;
    text-align: center;
}

.nkw-team-attendees-viewer .nkw-tav-auth-loading p {
    margin: 0.75em 0 0;
    color: #666;
    font-size: 0.9375em;
}

.nkw-team-attendees-viewer .nkw-tav-spinner {
    width: 2em;
    height: 2em;
    border: 3px solid #e5e7eb;
    border-top-color: rgba(77, 64, 178, 1);
    border-radius: 50%;
    animation: nkw-tav-spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 640px) {
    .nkw-team-attendees-viewer .nkw-tav-form {
        display: block !important;
    }

    .nkw-team-attendees-viewer .nkw-tav-form-row,
    .nkw-team-attendees-viewer .nkw-tav-password-section .nkw-tav-form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .nkw-team-attendees-viewer .nkw-tav-input {
        width: 100%;
        min-width: auto;
    }

    .nkw-team-attendees-viewer .nkw-tav-form-row .nkw-tav-btn-primary {
        width: 100%;
    }

    .nkw-team-attendees-viewer .nkw-tav-table th,
    .nkw-team-attendees-viewer .nkw-tav-table td {
        padding: 0.35em 0.5em;
        font-size: 0.875em;
    }

    .nkw-team-attendees-viewer .nkw-tav-actions .nkw-tav-btn-secondary {
        width: 100%;
        text-align: center;
    }
}
