/* Rihland Shared CSS - Common styles across all pages */

/* Global Variables */
:root {
    --primary-color: #f1c232;
    --primary-dark: #d4ac2a;
    --secondary-color: #0b1426;
    --accent-color: #152238;
    --text-primary: #e6edf5;
    --text-secondary: #b6c2d3;
    --text-muted: #8b9bb3;
    --border-color: #1f3358;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

/* Enhanced Donation Modal Styles */
.donation-amounts {
    margin-bottom: 2rem;
    text-align: center;
}

.donation-amounts h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.amount-btn {
    background: var(--accent-color);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.amount-btn:hover {
    border-color: var(--primary-color);
    background: var(--border-color);
    transform: translateY(-2px);
}

.amount-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(241, 194, 50, 0.3);
}

.custom-amount {
    position: relative;
    padding: 0.75rem 0.5rem;
}

.custom-amount input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
}

.custom-amount input::placeholder {
    color: var(--text-muted);
}

.credit-info {
    background: rgba(241, 194, 50, 0.1);
    border: 1px solid rgba(241, 194, 50, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.credit-info span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Payment Methods Section */
.payment-methods {
    margin-bottom: 2rem;
}

.payment-methods h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.payment-section {
    background: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.payment-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.payment-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Stripe Placeholder */
.stripe-placeholder {
    text-align: center;
    padding: 1rem;
}

.stripe-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stripe-placeholder h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stripe-placeholder p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Payment Buttons */
.payment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.payment-btn:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.payment-btn.stripe-btn {
    background: var(--text-muted);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.payment-btn.guest-btn {
    background: var(--info-color);
    color: white;
}

.payment-btn.guest-btn:hover {
    background: #2563eb;
}

.payment-icon {
    font-size: 1.1rem;
}

/* Guest Donation */
.guest-donation {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.guest-donation p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Credit Preview */
.credit-preview {
    background: rgba(241, 194, 50, 0.1);
    border: 1px solid rgba(241, 194, 50, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.credit-preview h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.credit-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.credit-icon {
    font-size: 1.5rem;
}

.credit-amount span:last-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.credit-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Enhanced Modal Styles */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--accent-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .amount-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95vw;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .payment-section {
        padding: 1rem;
    }
}

/* Animation Enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-section {
    animation: fadeInUp 0.5s ease forwards;
}

.payment-section:nth-child(2) {
    animation-delay: 0.1s;
}

.payment-section:nth-child(3) {
    animation-delay: 0.2s;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced Button States */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* PayPal Hosted Button Styling */
#paypal-container-PSYFB43FTB2PN {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 50px;
}

#paypal-container-PSYFB43FTB2PN iframe {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Donation Info Styling */
.donation-info {
    margin-bottom: 2rem;
    text-align: center;
}

/* PayPal Fallback Button */
#paypal-fallback {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 112, 186, 0.1);
    border: 1px solid rgba(0, 112, 186, 0.2);
    border-radius: 8px;
    margin-top: 1rem;
}

#paypal-fallback p {
    color: #f1c232;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

#paypal-fallback .payment-btn {
    background: #0070ba;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#paypal-fallback .payment-btn:hover {
    background: #005ea6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 112, 186, 0.3);
}

/* Payment Status Styling */
.payment-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.status-message {
    font-weight: 600;
    font-size: 0.95rem;
}

.status-message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* PayPal Button Container */
.paypal-button-container {
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

/* Simple Message Styling */
.simple-message {
    text-align: center;
    padding: 2rem 1rem;
}

.simple-message h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.simple-message p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.info-box {
    background: rgba(241, 194, 50, 0.1);
    border: 1px solid rgba(241, 194, 50, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.info-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-box ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    line-height: 1.8;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.contact-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contact-btn {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.contact-icon {
    font-size: 1.1rem;
}

/* Account Dropdown Styles */
.account-dropdown {
    position: relative;
    display: inline-block;
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f1c232, #ffd966);
    color: #0b1426;
    border: 2px solid #f1c232;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.account-btn:hover {
    background: #f1c232;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 194, 50, 0.4);
}

.account-avatar {
    width: 32px;
    height: 32px;
    background: rgba(11, 20, 38, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0b1426;
}

.account-chevron {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.account-btn[aria-expanded="true"] .account-chevron {
    transform: rotate(180deg);
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #152238, #0b1426);
    border: 1px solid rgba(241, 194, 50, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(241, 194, 50, 0.1);
}

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

.user-name {
    color: #f1c232;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.user-email {
    color: #b6c2d3;
    font-size: 0.9rem;
    word-break: break-all;
}

.dropdown-divider {
    height: 1px;
    background: rgba(241, 194, 50, 0.1);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #e6edf5;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dropdown-item:hover {
    background: rgba(241, 194, 50, 0.1);
    color: #f1c232;
}

.dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.credits-item {
    color: #f1c232;
    font-weight: 600;
    cursor: default;
}

.credits-item:hover {
    background: none;
    color: #f1c232;
}

.signout-btn {
    color: #ef4444;
}

.signout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Mobile Responsive Account Dropdown */
@media (max-width: 768px) {
    .dropdown-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        min-width: auto;
        max-height: 100vh;
        height: 100vh;
        overflow-y: auto;
        z-index: 10001;
        background: rgba(11, 20, 38, 0.98);
        backdrop-filter: blur(10px);
    }
    
    .dropdown-panel.show {
        transform: translateY(0);
    }
    
    .account-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .account-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    /* Ensure dropdown content is fully visible */
    .dropdown-header {
        padding: 2rem 1.5rem 1.5rem;
        border-bottom: 1px solid rgba(241, 194, 50, 0.2);
    }
    
    .dropdown-item {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Mobile close button styles */
    .mobile-close-btn {
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
        color: #f1c232;
        cursor: pointer;
        z-index: 10002;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(11, 20, 38, 0.8);
        border-radius: 50%;
        border: 2px solid #f1c232;
        transition: all 0.3s ease;
    }
    
    .mobile-close-btn:hover {
        background: rgba(241, 194, 50, 0.2);
        transform: scale(1.1);
    }
}


