/**
 * SR Partial Payments - Frontend Styles
 * Modern UI/UX Design
 */

/* Payment Options Container */
.srpp-payment-options {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.srpp-payment-options h3 {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 18px;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.srpp-payment-options h3::before {
    content: "💳";
    font-size: 20px;
}

/* Option Wrapper */
.srpp-option-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Option - Card Style */
.srpp-option {
    display: block;
    position: relative;
    cursor: pointer;
}



.srpp-option-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

/* Custom Radio Button Logic - HIDDEN INPUT */
.srpp-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Option Title - Bold & Clean */
.srpp-option-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    position: relative;
}

/* Checked State Card Background & Active Line */
.srpp-option input:checked+.srpp-option-content {
    border-color: #059669;
    background-color: #ecfdf5;
    /* Light green tint */
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

/* Active Indicator Line Color */
.srpp-option input:checked+.srpp-option-content::before {
    background: #059669;
}

/* Hover State */
.srpp-option:hover .srpp-option-content {
    border-color: #6ee7b7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.srpp-option-amount {
    font-size: 20px;
    font-weight: 800;
    color: #059669;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.srpp-option-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

/* Option Header with Badge */
.srpp-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}



/* Warning Message */
.srpp-warning {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: #FFF7ED;
    border-left: 3px solid #F97316;
    border-radius: 6px;
    font-size: 12px;
    color: #C2410C;
}

/* Trust Message */
.srpp-trust-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border-radius: 8px;
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

.srpp-trust-message span:first-child {
    font-size: 16px;
}

/* Hint Text */
.srpp-hint {
    margin: 12px 0 0 0;
    padding: 0;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

/* Trust Section */
.srpp-trust-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

/* NEW: Trust Row - Horizontal Layout */
.srpp-trust-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.srpp-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.srpp-trust-item span:first-child {
    font-size: 16px;
}

.srpp-trust-divider {
    color: #cbd5e1;
    font-size: 8px;
}

/* Desktop Trust Badges - default visible, horizontal */
.srpp-trust-desktop {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    padding: 14px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* Mobile Trust Badge - default hidden */
.srpp-trust-mobile {
    display: none !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.srpp-trust-mobile span:first-child {
    font-size: 16px;
}

.srpp-trust-mobile span:last-child {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

/* IMPROVED: Recommended Badge - Separate & Distinct */
.srpp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 12px;
    margin-right: 16px;
}

.srpp-badge-recommended {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.srpp-badge-recommended::before {
    content: "⭐";
    font-size: 10px;
}

.srpp-badge-fee {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
    border: none;
    font-weight: 800;
    padding: 5px 12px;
}

.srpp-badge-fee * {
    color: #ffffff !important;
    background: transparent !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Recommended Option Glow */
.srpp-recommended .srpp-option-content {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Option Header - Flex Layout */
.srpp-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Option Content - Better Layout */
.srpp-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {

    /* Hide desktop badges, show mobile */
    .srpp-trust-desktop {
        display: none !important;
    }

    .srpp-trust-mobile {
        display: flex !important;
    }

    .srpp-trust-row {
        gap: 10px !important;
        padding: 10px 12px !important;
        justify-content: space-around !important;
    }

    .srpp-trust-item {
        font-size: 10px !important;
        gap: 4px !important;
    }

    .srpp-trust-item span:first-child {
        font-size: 12px !important;
    }

    .srpp-trust-divider {
        display: none;
    }

    .srpp-option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .srpp-option-header {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .srpp-option-amount {
        align-self: flex-end;
    }

    .srpp-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        margin: 0 !important;
        order: unset;
        font-size: 8px !important;
        padding: 3px 8px !important;
    }

    .srpp-payment-options {
        padding: 16px;
        margin: 16px 0;
    }

    .srpp-payment-options h3 {
        font-size: 16px;
    }
}

/* Partial Details Section */
.srpp-partial-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed #e2e8f0;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* Amount Input Section */
.srpp-amount-input {
    margin-bottom: 24px;
}

.srpp-amount-input label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}

/* Modern Clean Input Field */
.srpp-amount-field {
    width: 100%;
    max-width: 200px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.srpp-amount-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.1);
}

.srpp-amount-field::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* Remove number input arrows */
.srpp-amount-field::-webkit-outer-spin-button,
.srpp-amount-field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.srpp-amount-field[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Minimum Note */
.srpp-min-note {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.srpp-min-note::before {
    content: "ℹ️";
    font-size: 14px;
}

/* Quick Amount Buttons */
.srpp-quick-amounts {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.srpp-quick-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.srpp-quick-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.srpp-quick-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
}

/* Payment Slider */
.srpp-slider-container {
    margin-top: 20px;
    padding: 0 5px;
}

.srpp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #e2e8f0 0%);
    outline: none;
    transition: background 0.3s ease;
}

.srpp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s ease;
}

.srpp-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.srpp-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.srpp-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Summary Section - Card Style */
.srpp-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 8px;
}

.srpp-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
}

.srpp-summary-row:not(:last-child) {
    border-bottom: 1px dashed #cbd5e1;
}

.srpp-summary-row span:first-child {
    color: #64748b;
    font-weight: 500;
}

/* COD Value - Specific Class to prevent duplicate icons */
.srpp-cod-value {
    color: #dc2626;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.srpp-cod-value::before {
    content: "🚚";
    font-size: 16px;
}

.srpp-total-row {
    font-weight: 700;
    font-size: 17px;
    padding-top: 16px !important;
    margin-top: 4px;
}

.srpp-total-row span:first-child {
    color: #1e293b;
}

.srpp-total-row span:last-child {
    color: #1e293b;
    font-size: 20px;
}

/* Online Amount - Green */
.srpp-summary-row:first-child span:last-child {
    color: #059669;
    font-weight: 700;
    font-size: 16px;
}

/* Error State */
.srpp-input-wrapper.srpp-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.srpp-input-wrapper.srpp-error input {
    color: #dc2626;
}

.srpp-error-message {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.srpp-error-message::before {
    content: "⚠️";
}

/* Responsive */
@media screen and (max-width: 600px) {
    .srpp-payment-options {
        padding: 16px;
        border-radius: 12px;
    }

    .srpp-option-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }

    .srpp-option:first-child .srpp-option-content::after {
        position: static;
        margin-top: 8px;
    }

    .srpp-input-wrapper {
        max-width: 100%;
    }

    .srpp-input-wrapper input {
        font-size: 18px;
        padding: 12px;
    }

    .srpp-quick-amounts {
        justify-content: center;
    }

    .srpp-quick-btn {
        flex: 1;
        min-width: 70px;
        text-align: center;
        padding: 12px 8px;
    }
}

/* Badge Styles */
.srpp-badge-partial {
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.srpp-badge-full {
    background: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Thank You Page Box */
.srpp-thankyou-box {
    background: #f8f9fa;
    border: 2px dashed #007cba;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
}

.srpp-thankyou-title {
    color: #007cba;
    margin-top: 0;
}

.srpp-amount-row {
    font-size: 16px;
    margin: 10px 0;
}