/**
 * GOH PayPal Donations - Frontend Styles
 * Matches GiveWP light theme style
 */

/* ============================================
   CSS Variables for Theming
   ============================================ */
:root {
    /* Light theme (default) - matches GiveWP style */
    --goh-bg: #ffffff;
    --goh-bg-secondary: #f5f5f5;
    --goh-text-primary: #1a1a1a;
    --goh-text-secondary: #333333;
    --goh-text-muted: #666666;
    --goh-border: #cccccc;
    --goh-input-bg: #ffffff;
    --goh-input-border: #cccccc;
    --goh-accent: #333333;
    --goh-accent-hover: #1a1a1a;
    --goh-button-bg: #333333;
    --goh-button-text: #ffffff;
    --goh-button-hover: #1a1a1a;
    --goh-success-bg: #d4edda;
    --goh-success-text: #155724;
    --goh-error-bg: #f8d7da;
    --goh-error-text: #721c24;
    --goh-shadow: rgba(0, 0, 0, 0.05);
    --goh-amount-bg: #333333;
    --goh-amount-text: #ffffff;
    --goh-amount-active-bg: #1a1a1a;
}

/* Dark theme */
.goh-donation-wrapper.goh-theme-dark {
    --goh-bg: #1a1a1a;
    --goh-bg-secondary: #2a2a2a;
    --goh-text-primary: #ffffff;
    --goh-text-secondary: #cccccc;
    --goh-text-muted: #888888;
    --goh-border: #3a3a3a;
    --goh-input-bg: #2a2a2a;
    --goh-input-border: #444444;
    --goh-accent: #ffffff;
    --goh-accent-hover: #cccccc;
    --goh-button-bg: #ffffff;
    --goh-button-text: #1a1a1a;
    --goh-button-hover: #e0e0e0;
    --goh-success-bg: #1a2e1a;
    --goh-success-text: #68d391;
    --goh-error-bg: #2d1a1a;
    --goh-error-text: #fc8181;
    --goh-shadow: rgba(0, 0, 0, 0.3);
    --goh-amount-bg: #3a3a3a;
    --goh-amount-text: #ffffff;
    --goh-amount-active-bg: #555555;
}

/* ============================================
   Wrapper - Clean minimal style
   ============================================ */
.goh-donation-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: var(--goh-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--goh-text-primary);
}

/* With card background */
.goh-donation-wrapper.goh-bg-card {
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--goh-shadow);
    border: 1px solid var(--goh-border);
}

/* Transparent background option */
.goh-donation-wrapper.goh-bg-transparent {
    background: transparent;
    padding: 20px 0;
}

/* ============================================
   Title & Description
   ============================================ */
.goh-donation-title {
    margin: 0 0 20px;
    font-size: 28px;
    font-weight: 600;
    color: var(--goh-text-primary);
    text-align: left;
}

.goh-donation-description {
    margin: 0 0 25px;
    color: var(--goh-text-secondary);
    line-height: 1.6;
    font-size: 16px;
}

/* ============================================
   Form Groups
   ============================================ */
.goh-form-group {
    margin-bottom: 24px;
}

.goh-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--goh-text-primary);
}

.goh-optional {
    font-weight: 400;
    color: var(--goh-text-muted);
    font-size: 13px;
}

/* ============================================
   Amount Buttons - GiveWP Style
   ============================================ */
.goh-amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.goh-amount-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--goh-amount-text);
    background: var(--goh-amount-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
}

.goh-amount-btn:hover {
    background: #555555;
}

.goh-amount-btn.active {
    background: #0073aa;
    border: 2px solid #0073aa;
    color: #ffffff;
    transform: scale(1.02);
}

.goh-amount-custom-btn {
    background: transparent;
    border: 1px solid var(--goh-border);
    color: var(--goh-text-primary);
}

.goh-amount-custom-btn:hover {
    background: var(--goh-bg-secondary);
}

.goh-amount-custom-btn.active {
    background: var(--goh-bg-secondary);
    border-color: var(--goh-accent);
}

/* ============================================
   Custom Amount Input
   ============================================ */
.goh-custom-amount-wrapper {
    margin-top: 12px;
}

.goh-input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--goh-input-border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--goh-input-bg);
    transition: border-color 0.2s;
}

.goh-input-with-prefix:focus-within {
    border-color: var(--goh-accent);
}

.goh-input-prefix {
    padding: 12px 14px;
    background: var(--goh-bg-secondary);
    color: var(--goh-text-secondary);
    font-size: 16px;
    font-weight: 500;
    border-right: 1px solid var(--goh-input-border);
}

.goh-custom-amount-input {
    flex: 1;
    padding: 12px 14px;
    font-size: 16px;
    border: none;
    outline: none;
    background: var(--goh-input-bg);
    color: var(--goh-text-primary);
    -moz-appearance: textfield;
}

.goh-custom-amount-input::-webkit-outer-spin-button,
.goh-custom-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.goh-help-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--goh-text-muted);
}

/* ============================================
   Text Inputs - Clean GiveWP style
   ============================================ */
.goh-input,
.goh-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    color: var(--goh-text-primary);
    background: var(--goh-input-bg);
    border: 1px solid var(--goh-input-border);
    border-radius: 4px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.goh-input:focus,
.goh-textarea:focus {
    outline: none;
    border-color: var(--goh-accent);
}

.goh-input::placeholder,
.goh-textarea::placeholder {
    color: var(--goh-text-muted);
}

.goh-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ============================================
   Checkbox
   ============================================ */
.goh-checkbox-group {
    margin-top: 8px;
}

.goh-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--goh-text-secondary);
    line-height: 1.4;
    gap: 10px;
}

.goh-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    accent-color: #0073aa;
    cursor: pointer;
    flex-shrink: 0;
}

/* ============================================
   Donation Total Display
   ============================================ */
.goh-donation-total {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--goh-bg-secondary);
    border-radius: 4px;
    margin-bottom: 20px;
}

.goh-donation-total-label {
    font-weight: 600;
    color: var(--goh-text-primary);
}

.goh-donation-total-amount {
    font-size: 18px;
    font-weight: 600;
    color: var(--goh-text-primary);
}

/* ============================================
   Messages
   ============================================ */
.goh-message {
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.goh-error-message {
    background: var(--goh-error-bg);
    color: var(--goh-error-text);
}

.goh-success-message {
    background: var(--goh-success-bg);
    color: var(--goh-success-text);
}

/* ============================================
   PayPal Button Container
   ============================================ */
.goh-paypal-button-container {
    margin: 20px 0;
}

/* ============================================
   Submit Button - GiveWP Style
   ============================================ */
.goh-submit-container {
    margin-top: 24px;
}

.goh-submit-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--goh-button-text);
    background: var(--goh-button-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.goh-submit-btn:hover:not(:disabled) {
    background: var(--goh-button-hover);
}

.goh-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.goh-btn-loading {
    display: flex;
    align-items: center;
}

.goh-spinner {
    width: 20px;
    height: 20px;
    animation: goh-spin 1s linear infinite;
}

@keyframes goh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Security Note
   ============================================ */
.goh-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--goh-text-muted);
}

.goh-security-note svg {
    color: var(--goh-text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .goh-donation-wrapper {
        padding: 20px 15px;
    }

    .goh-amount-buttons {
        justify-content: center;
    }

    .goh-amount-btn {
        flex: 1 1 calc(33% - 8px);
        min-width: auto;
    }

    .goh-amount-custom-btn {
        flex: 1 1 100%;
    }
}

/* ============================================
   Compact Mode
   ============================================ */
.goh-donation-wrapper.goh-compact .goh-donation-title {
    font-size: 22px;
    margin-bottom: 15px;
}

.goh-donation-wrapper.goh-compact .goh-form-group {
    margin-bottom: 16px;
}

.goh-donation-wrapper.goh-compact .goh-amount-btn {
    padding: 10px 16px;
    font-size: 14px;
}

.goh-donation-wrapper.goh-compact .goh-input,
.goh-donation-wrapper.goh-compact .goh-textarea {
    padding: 10px 12px;
    font-size: 14px;
}
