/**
 * PDX.Gives - Member Authentication Styles
 */

/* ============================================
   Account Menu & User Dropdown
   ============================================ */

.account-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.account-menu .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    background: none;
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.user-dropdown-toggle:hover {
    background: var(--primary);
    color: white;
}

.user-greeting {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-badges {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: 0.25rem;
}

.user-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.badge-admin {
    background: linear-gradient(135deg, #E67332, #C65A28);
    color: white;
}

.badge-volunteer {
    background: linear-gradient(135deg, #8B4513, #6D3612);
    color: white;
}

.user-dropdown-toggle:hover .user-greeting {
    color: white;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.user-dropdown-toggle:hover .dropdown-arrow {
    transform: translateY(2px);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-item:hover {
    background: var(--light);
}

.logout-link {
    color: #c33;
}

.logout-link:hover {
    background: #fee;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* ============================================
   Auth Modal
   ============================================ */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-modal-close:hover {
    color: var(--primary);
}

.auth-modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 2rem;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 2rem;
}

.auth-forms {
    position: relative;
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
}

/* ============================================
   RSVP Modal
   ============================================ */

.rsvp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rsvp-modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.rsvp-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.rsvp-modal-close:hover {
    color: var(--primary);
}

.rsvp-modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 2rem;
}

.rsvp-modal-content p {
    color: #666;
    margin-bottom: 2rem;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rsvp-error {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
}

.rsvp-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
}

.rsvp-success h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.rsvp-success p {
    color: #666;
    margin-bottom: 1rem;
}

.rsvp-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.rsvp-item {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.rsvp-item h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.rsvp-item p {
    margin: 0.5rem 0;
    color: #666;
}

.status-confirmed {
    color: #4CAF50;
    font-weight: 600;
    text-transform: uppercase;
}

.status-cancelled {
    color: #f44336;
    font-weight: 600;
    text-transform: uppercase;
}

.status-waitlist {
    color: #ff9800;
    font-weight: 600;
    text-transform: uppercase;
}

.no-rsvps {
    text-align: center;
    color: #999;
    padding: 2rem;
}

/* ============================================
   Ticket Options
   ============================================ */

.ticket-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.ticket-options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.ticket-option-row {
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    background: white;
}

.ticket-option-row.primary-ticket {
    border-color: var(--burnt-orange);
    background: linear-gradient(135deg, rgba(230, 115, 50, 0.05), rgba(139, 69, 19, 0.05));
    box-shadow: 0 2px 8px rgba(230, 115, 50, 0.15);
}

.ticket-option-row:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ticket-info {
    flex: 1;
}

.ticket-info h4 {
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}

.ticket-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--burnt-orange);
    margin: 0.25rem 0;
}

.ticket-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.ticket-spots {
    display: inline-block;
    font-size: 0.8rem;
    color: #888;
    background: #f5f5f5;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.ticket-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.ticket-quantity label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.ticket-quantity input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    font-size: 1.1rem;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
}

.ticket-quantity input[type="number"]:focus {
    border-color: var(--primary);
    outline: none;
}

.ticket-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.summary-row.total {
    border-top: 2px solid #ddd;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.capacity-info {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.capacity-info.good {
    background: rgba(139, 69, 19, 0.1);
    color: var(--sage-green);
}

.capacity-info.low {
    background: rgba(212, 167, 106, 0.2);
    color: #d4a76a;
}

.capacity-info.full {
    background: rgba(224, 123, 83, 0.2);
    color: var(--burnt-orange);
}

/* ============================================
   Welcome Prompt
   ============================================ */

.welcome-prompt {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-prompt-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    position: relative;
}

.welcome-prompt-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.welcome-prompt-close:hover {
    color: var(--primary);
}

.welcome-prompt-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.welcome-prompt-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.welcome-prompt-content button {
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .auth-modal-content,
    .rsvp-modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .welcome-prompt {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .welcome-prompt-content {
        max-width: 100%;
    }

    .account-menu {
        gap: 0.5rem;
    }

    .account-menu .btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .user-dropdown-menu {
        right: 0;
        left: auto;
    }
}

@media (max-width: 768px) {
    .ticket-option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ticket-quantity {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .ticket-quantity input[type="number"] {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .auth-modal-content h2,
    .rsvp-modal-content h2 {
        font-size: 1.5rem;
    }

    .auth-modal-close,
    .rsvp-modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
    }

    .ticket-info h4 {
        font-size: 1.1rem;
    }

    .ticket-price {
        font-size: 1.25rem;
    }

    .summary-row.total {
        font-size: 1.1rem;
    }
}

/* ============================================
   Checkbox Group Styles
   ============================================ */

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.checkbox-label:hover {
    border-color: var(--burnt-orange);
    background: #fff;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--burnt-orange);
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.checkbox-text strong {
    color: var(--dark-text);
    font-size: 0.9375rem;
    font-weight: 600;
}

.checkbox-text small {
    color: var(--soft-gray);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text strong {
    color: var(--burnt-orange);
}

@media (max-width: 768px) {
    .checkbox-label {
        padding: 0.875rem;
    }

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .checkbox-text strong {
        font-size: 0.875rem;
    }

    .checkbox-text small {
        font-size: 0.75rem;
    }
}
