@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* Campaign Single Page Styles */

.dm-campaign-single-page {
    margin: 0;
    padding: 0;
    font-family: 'Manrope', sans-serif;
    background: #f5f5f5;
}

.dm-campaign-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding-top: 80px;
}

/* Header */
.dm-campaign-header {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.dm-campaign-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Content grid */
.dm-campaign-content {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 40px;
    padding: 40px;
    align-items: start;
}

.dm-campaign-info {
    padding-right: 20px;
}

.dm-donation-form-container {
    position: static !important;
    width: 100%;
    height: fit-content;
    z-index: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

@media (min-width: 1200px) {
    .dm-donation-form-container {
        position: static !important;
        width: 100%;
        z-index: auto !important;
        top: auto !important;
        left: auto !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .dm-donation-form-container {
        position: static !important;
        width: 100%;
        z-index: auto !important;
        top: auto !important;
        left: auto !important;
    }
}

@media (max-width: 767px) {
    .dm-donation-form-container {
        position: static !important;
        width: 100%;
    }
}

/* Scroll-to-top button */
#dm-scroll-top-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    background: #1e1b4b;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(30,27,75,.35);
    transition: background 0.2s, transform 0.15s;
    z-index: 9999;
    padding: 0;
}

#dm-scroll-top-btn:hover {
    background: #2a2275;
    transform: translateY(-2px);
}

.dm-campaign-title {
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #000000;
    line-height: 1.2;
    font-family: 'Manrope', sans-serif;
}

/* Stats */
.dm-campaign-stats {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.dm-stat-raised {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.dm-stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.dm-stat-value {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--dm-primary, #2271b1);
    line-height: 1;
}

.dm-stat-goal {
    font-size: 1em;
    color: #666;
    margin-top: 5px;
}

.dm-progress-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.dm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dm-primary, #2271b1), var(--dm-secondary, #135e96));
    transition: width 0.5s ease;
}

.dm-campaign-description {
    font-size: 20px;
    line-height: 1.8;
    color: #535353;
    font-family: 'Manrope', sans-serif;
}

.dm-campaign-description p {
    font-size: 20px;
    color: #535353;
    font-family: 'Manrope', sans-serif;
}

/* Donation Form Card */
.dm-form-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.dm-form-card h2 {
    font-size: 22px;
    margin: 0 0 20px 0;
    color: #000000;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
}

.dm-form-card h3 {
    font-size: 16px;
    margin: 30px 0 15px 0;
    color: #000000;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
}

/* Value Options */
.dm-value-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.dm-value-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.dm-value-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.dm-value-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.dm-value-option input[type="radio"]:checked + .dm-value-label {
    background: var(--dm-primary, #2271b1);
    border-color: var(--dm-primary, #2271b1);
    color: #fff;
    transform: scale(1.05);
}

.dm-value-option:hover .dm-value-label {
    border-color: var(--dm-primary, #2271b1);
}

/* Custom Amount */
.dm-custom-amount-field {
    margin: 20px 0;
}

.dm-custom-amount-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.dm-input-group {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.dm-input-group:focus-within {
    border-color: var(--dm-primary, #2271b1);
}

.dm-input-prefix {
    padding: 12px 15px;
    background: #f9f9f9;
    font-weight: 600;
    color: #666;
}

.dm-input-group input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 1.1em;
    outline: none;
}

/* Subscription Notice */
.dm-subscription-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    margin: 20px 0;
    color: #1565C0;
    font-size: 0.95em;
}

/* Donation Frequency */
.dm-donation-frequency {
    margin: 30px 0;
}

.dm-donation-frequency h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

.dm-frequency-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dm-frequency-option {
    position: relative;
    cursor: pointer;
    display: block;
}

.dm-frequency-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.dm-frequency-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.dm-frequency-option input[type="radio"]:checked + .dm-frequency-content {
    background: #fff;
    border-color: var(--dm-primary, #2271b1);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.dm-frequency-content strong {
    font-size: 1.1em;
}

.dm-frequency-content small {
    color: #666;
    font-size: 0.9em;
}

/* Form Groups */
.dm-form-group {
    margin-bottom: 20px;
}

.dm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #535353;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
}

.dm-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.dm-form-group input:focus {
    outline: none;
    border-color: var(--dm-primary, #2271b1);
}

/* Buttons */
.dm-btn-primary,
.dm-btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dm-btn-primary {
    background: #1D185E;
    color: #FFFFFF;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.dm-btn-primary:hover {
    background: #2a2275;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dm-btn-secondary {
    background: transparent !important;
    color: #1e1b4b !important;
    border: 2px solid #1e1b4b !important;
}

.dm-btn-secondary:hover {
    background: #1e1b4b !important;
    color: #ffffff !important;
    border-color: #1e1b4b !important;
}

.dm-btn-large {
    width: 100%;
    padding: 18px;
    font-size: 1.2em;
    margin-top: 10px;
}

/* Payment Step */
.dm-step-payment {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
}

.dm-payment-container {
    text-align: center;
    max-width: 500px;
}

.dm-payment-header h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.dm-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--dm-primary, #2271b1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Thank You Step */
.dm-step-thank-you {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
}

.dm-thank-you-container {
    text-align: center;
    max-width: 600px;
}

.dm-success-icon {
    margin-bottom: 30px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.dm-thank-you-container h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.dm-thank-you-message {
    font-size: 1.2em;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

/* Credentials Box */
.dm-account-credentials {
    background: #f7f7fb;
    border: 1.5px solid #d4d0f0;
    border-radius: 14px;
    padding: 24px 28px;
    margin: 0 auto 32px;
    max-width: 420px;
    text-align: left;
}

.dm-credentials-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.dm-credentials-header strong {
    font-size: 16px;
    font-weight: 700;
    color: #1e1b4b;
    font-family: 'Manrope', sans-serif;
}

.dm-credentials-hint {
    font-size: 14px;
    color: #535353;
    margin: 0 0 16px;
    font-family: 'Manrope', sans-serif;
}

.dm-credential-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
}

.dm-credential-label {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 44px;
    font-family: 'Manrope', sans-serif;
}

.dm-credential-value {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1e1b4b;
    font-family: 'Manrope', monospace;
    word-break: break-all;
}

.dm-copy-cred-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.dm-copy-cred-btn:hover {
    color: #1e1b4b;
    background: #eee;
}

.dm-copy-cred-btn.dm-copy-done {
    color: #22c55e;
}

.dm-portal-access-btn {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #1e1b4b;
    color: #fff !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    text-decoration: none !important;
    transition: background 0.2s;
}

.dm-portal-access-btn:hover {
    background: #2a2275;
}

.dm-thank-you-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}


/* PIX Modal Overlay */
.dm-pix-modal-overlay {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.dm-pix-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    font-family: 'Manrope', sans-serif;
}

.dm-pix-modal-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 8px 0;
    font-family: 'Manrope', sans-serif;
}

.dm-pix-modal-box > p {
    font-size: 16px;
    color: #535353;
    margin-bottom: 24px;
    font-family: 'Manrope', sans-serif;
}

.dm-pix-qrcode-wrap {
    margin-bottom: 20px;
}

.dm-pix-qrcode-wrap img {
    width: 200px;
    height: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
}

.dm-pix-copy-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.dm-pix-code-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Manrope', sans-serif;
    color: #333;
    background: #f9f9f9;
    cursor: text;
}

.dm-pix-info {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    font-family: 'Manrope', sans-serif;
}

/* Credit card fields */
#dm-card-fields {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

#dm-card-fields h3 {
    margin-top: 0 !important;
}

.dm-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Loading overlay */
.dm-loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #535353;
    gap: 16px;
}

.dm-form-card {
    position: relative;
}

/* Responsive */
@media (max-width: 968px) {
    .dm-campaign-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .dm-campaign-title {
        font-size: 2em;
    }
    
    .dm-stat-value {
        font-size: 2em;
    }
}

@media (max-width: 640px) {
    .dm-campaign-image img {
        height: 250px;
    }
    
    .dm-campaign-title {
        font-size: 1.5em;
    }
    
    .dm-value-options {
        grid-template-columns: 1fr;
    }
    
    .dm-thank-you-actions {
        flex-direction: column;
    }
    
    .dm-btn-primary,
    .dm-btn-secondary {
        width: 100%;
    }
}

/* Animations */
.dm-pulse {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

.dm-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

input, button {
    transition: all 0.3s ease !important;
}

/* Focus states */
input:focus,
button:focus {
    outline: 2px solid var(--dm-primary, #2271b1);
    outline-offset: 2px;
}

/* Loading state */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success animations */
.dm-fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Indicators */
.dm-step-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.dm-step-indicators::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.dm-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.dm-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s;
}

.dm-step-indicator.active .dm-step-number {
    background: var(--dm-primary, #2271b1);
    color: #fff;
    transform: scale(1.1);
}

.dm-step-indicator.completed .dm-step-number {
    background: #4CAF50;
    color: #fff;
}

.dm-step-label {
    font-size: 0.9em;
    color: #666;
}

.dm-step-indicator.active .dm-step-label {
    color: var(--dm-primary, #2271b1);
    font-weight: 600;
}

/* Form Steps */
.dm-form-step {
    animation: fadeIn 0.3s ease;
}

/* Payment Methods */
.dm-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.dm-payment-method {
    position: relative;
    cursor: pointer;
    display: block;
}

.dm-payment-method input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.dm-method-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
}

.dm-payment-method input[type="radio"]:checked + .dm-method-content {
    background: #fff;
    border-color: var(--dm-primary, #2271b1);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.1);
}

.dm-method-icon {
    font-size: 2em;
}

.dm-method-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dm-method-info strong {
    font-size: 1.1em;
}

.dm-method-info small {
    color: #666;
    font-size: 0.9em;
}

/* Payment Summary */
.dm-payment-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.dm-payment-summary h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.dm-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.dm-summary-row:last-child {
    border-bottom: none;
}

.dm-summary-amount {
    font-size: 1.3em;
    color: var(--dm-primary, #2271b1);
}

/* Form Actions */
.dm-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.dm-form-actions button {
    flex: 1;
}

/* Security Notice */
.dm-security-notice {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 15px;
}

/* Detail Photo */
.dm-detail-photo {
    margin: 30px 0;
}

.dm-detail-photo img {
    width: 100%;
    border-radius: 12px;
}

/* Organizer Info */
.dm-organizer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    margin-top: 30px;
}

.dm-organizer-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.dm-organizer-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dm-organizer-details strong {
    font-size: 1.1em;
}

.dm-organizer-details span {
    color: #666;
    font-size: 0.9em;
}

/* Error messages */
.dm-error-message {
    background: #fee;
    border-left: 4px solid #f44336;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #c62828;
}

.dm-success-message {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #2e7d32;
}

/* Responsive */
@media (max-width: 640px) {
    .dm-step-indicators::before {
        display: none;
    }
    
    .dm-step-label {
        font-size: 0.8em;
    }
    
    .dm-form-actions {
        flex-direction: column;
    }
    
    .dm-payment-methods {
        gap: 10px;
    }
    
    .dm-method-content {
        padding: 12px;
    }
}
