/* Login Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal {
    background: linear-gradient(135deg, rgba(13, 46, 31, 0.95), rgba(10, 26, 20, 0.98));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(45, 122, 79, 0.4);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    max-width: 450px;
    width: 90%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(61, 145, 98, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Larger modal for PayPal payment */
#paypalModal .modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: var(--spacing-md);
}

.modal-header h2 {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--color-text-dark);
    font-size: 0.95rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

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

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

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(45, 122, 79, 0.3);
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    color: var(--color-white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.1);
}

.form-group input::placeholder {
    color: var(--color-text-dark);
}

.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(45, 122, 79, 0.3);
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    color: var(--color-white);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.1);
}

.form-group textarea::placeholder {
    color: var(--color-text-dark);
}

.form-success {
    padding: 1rem;
    border-radius: var(--border-radius);
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #4ecdc4;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-align: center;
}

.payment-info {
    margin-bottom: 1.5rem;
}

.payment-details {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(45, 122, 79, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--color-text);
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-row.total {
    color: var(--color-accent);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(45, 122, 79, 0.5);
}

#paypal-button-container {
    margin: 1.5rem 0;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.form-actions .btnPrimary {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
}

.form-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: none;
}

.form-error.active {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-links {
    text-align: center;
    margin-top: var(--spacing-sm);
}

.form-links a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-links a:hover {
    color: var(--color-white);
}


/* Loading State */
.modal-form.loading .btnPrimary {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.modal-form.loading .btnPrimary::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid var(--color-white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ==================== LARGE MODAL (Expose Details) ==================== */

.modal-large {
    max-width: 1100px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    background: linear-gradient(135deg, rgba(13, 26, 45, 0.95), rgba(10, 14, 26, 0.98));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(45, 122, 79, 0.4);
}

.modal-large .modal-close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.modal-large .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
    transform: rotate(90deg);
}

#exposeModalContent {
    padding: 2.5rem;
    padding-top: 3.5rem;
}

/* Scrollbar Styling für Modal */
.modal-large::-webkit-scrollbar {
    width: 8px;
}

.modal-large::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-large::-webkit-scrollbar-thumb {
    background: rgba(78, 205, 196, 0.3);
    border-radius: 4px;
}

.modal-large::-webkit-scrollbar-thumb:hover {
    background: rgba(78, 205, 196, 0.5);
}

/* ==================== GOOGLE OAUTH BUTTON ==================== */

.social-login {
    margin: 1rem 0;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    color: #3c4043;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
    color: #3c4043;
}

.btn-google:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-google .google-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Divider between form and social login */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.form-divider::before {
    margin-right: 1rem;
}

.form-divider::after {
    margin-left: 1rem;
}
