/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f6f7fb;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Container System - Consistent alignment */
.container-payment {
    max-width: 900px;
    margin-right: auto;
    margin-left: auto;
    width: 100%;
    padding: 0 40px;
}

/* Header Section */
.site-header {
    background-color: #f6f7fb;
    height: 75px;
    border-bottom: 1px solid #d3d3d3;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

.site-header .container-payment {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo-pay {
    display: flex;
    align-items: center;
}

.logo-pay img {
    max-height: 44px;
    height: 100%;
    width: auto;
    object-fit: contain;
}

@media (max-width: 520px) {
    .site-header {
        height: 60px;
    }
    
    .logo-pay img {
        max-height: 32px;
    }
    
    .container-payment {
        padding: 0 20px;
    }
}

/* Payment Body and Steps */
.payment-body {
    background-color: #f6f7fb;
    width: 100%;
}

.payment-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 160px;
    padding: 40px 10px;
    margin: 0;
}

.payment-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1px;
    background-color: #d3d3d3;
    z-index: 0;
    transform: translate(-50%, -50%);
    margin-top: -10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.svg-container {
    background-color: #f6f7fb;
    padding: 6px;
    border-radius: 50%;
    border: 2px solid #66DFA0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    width: 43px;
    height: 43px;
    z-index: 1;
    box-shadow: 0 0 0 5px #f6f7fb;
    transition: all 0.3s ease;
}

.svg-container:hover {
    transform: scale(1.05);
}

.svg-container svg {
    width: 27px;
    height: 27px;
    fill: #66DFA0;
}

.svg-container i {
    font-size: 22px;
    color: #66DFA0;
}

.svg-container p {
    margin: 0;
    font-size: 21px !important;
    color: #66DFA0 !important;
    font-weight: 900 !important;
    line-height: 1;
}

.step p.lineItems {
    font-size: 14px;
    color: #776565;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 8px;
    text-align: center;
    white-space: nowrap;
    max-width: 120px;
    line-height: 1.2;
}

/* Main Content */
.payment-main {
    flex: 1;
    background-color: #f6f7fb;
    padding: 40px 0;
}

.payment-content-wrapper {

}

/* Payment Selection Section */
.payment-selection {

}

.payment-title {
    font-size: 17px;
    margin-bottom: 24px;
    color: #888b8e;
    font-weight: 600;
    text-align: start;
}

/* Payment Grid System */
.payment-grid-container {
    max-width: 100%;
    margin: 0 auto;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Payment methods */
.payment-method {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.payment-method:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-method.selected {
    border-color: #a855f7;
    background-color: #faf5ff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15);
}

.payment-method.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #f8f9fa;
    border-color: #e5e7eb;
    pointer-events: none;
}

.payment-method.disabled:hover {
    border-color: #e5e7eb;
    box-shadow: none;
    transform: none;
}

.payment-method.disabled .payment-name {
    color: #9ca3af;
}

.payment-method.disabled .payment-subtitle {
    color: #9ca3af;
    font-style: italic;
}

.payment-method.disabled .payment-icon {
    color: #d1d5db;
}

.payment-method.disabled .radio-button {
    border-color: #d1d5db;
    background-color: #f8f9fa;
}

.payment-method.empty {
    border: none;
    background: transparent;
    cursor: default;
    min-height: auto;
}

.payment-method.empty:hover {
    border: none;
    box-shadow: none;
}

.payment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
}

.payment-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.radio-button {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.payment-method.selected .radio-button {
    border-color: #a855f7;
    background-color: #a855f7;
}

.radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
    display: none;
}

.payment-method.selected .radio-dot {
    display: block;
}

/* Payment Name */
.payment-name {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
    margin: 0;
}

/* Payment Icon */
.payment-icon {
    width: 24px;
    height: 24px;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Payment Subtitle */
.payment-subtitle {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.3;
    margin-top: 4px;
    padding-left: 32px;
}

/* Remove old styles */
.payment-methods-container,
.payment-checkbox {
    display: none;
}

.payment-content {
    display: none;
}

/* Action Buttons - Updated Design */
.action-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.cancel-button {
    color: #9ca3af;
    font-size: 16px;
    font-weight: 400;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 12px 0;
}

.cancel-button:hover {
    color: #6b7280;
}

.pay-button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 18px 80px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.pay-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.pay-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    padding: 25px 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
}

.footer-links {
    color: white;
    font-size: 14px;
}

.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.footer-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

.footer-separator {
    margin: 0 15px;
    opacity: 0.6;
}

/* Loading States */
.payment-method.loading {
    pointer-events: none;
    opacity: 0.7;
}

.pay-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.pay-button.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .payment-steps {
        gap: 100px;
        padding: 35px 10px;
    }
    
    .payment-steps::before {
        width: calc(100% - 100px);
    }
    
    .step p.lineItems {
        font-size: 13px;
        max-width: 100px;
    }
    
    .svg-container {
        width: 40px;
        height: 40px;
    }
    
    .svg-container svg {
        width: 24px;
        height: 24px;
    }
    
    .svg-container i {
        font-size: 20px;
    }
    
    .svg-container p {
        font-size: 19px !important;
    }

    .container-payment {
        padding: 0 25px;
    }
    
    .payment-main {
        padding: 30px 0;
    }
    
    .payment-selection {
        padding: 25px 20px;
        border-radius: 8px;
    }
    
    .payment-title {
        font-size: 17px;
        margin-bottom: 24px;
        color: #888b8e;
        font-weight: 600;
        text-align: start;
    }
    
    .payment-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .payment-method {
        padding: 16px;
        min-height: 100px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .pay-button {
        order: -1;
        padding: 20px 40px;
    }

    .cancel-button {
        text-align: center;
    }
}

/* Responsive Design - Small Mobile */
@media (max-width: 565px) {
    .payment-steps {
        gap: 60px;
        padding: 30px 10px;
    }
    
    .payment-steps::before {
        width: calc(100% - 80px);
    }
    
    .step p.lineItems {
        font-size: 12px;
        max-width: 80px;
    }
    
    .svg-container {
        width: 38px;
        height: 38px;
    }
    
    .svg-container svg {
        width: 22px;
        height: 22px;
    }
    
    .svg-container i {
        font-size: 18px;
    }
    
    .svg-container p {
        font-size: 17px !important;
    }
}

/* Responsive Design - Extra Small Mobile */
@media (max-width: 430px) {
    .payment-steps {
        gap: 40px;
        padding: 25px 5px;
    }
    
    .payment-steps::before {
        width: calc(100% - 60px);
        margin-top: 1px;
    }
    
    .step p.lineItems {
        font-size: 11px;
        max-width: 70px;
    }
    
    .svg-container {
        width: 35px;
        height: 35px;
    }
    
    .svg-container svg {
        width: 20px;
        height: 20px;
    }
    
    .svg-container i {
        font-size: 16px;
    }
    
    .svg-container p {
        font-size: 15px !important;
    }

    .container-payment {
        padding: 0 10px;
    }

    .payment-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .payment-grid-container {
        margin: 0;
    }

    .payment-method {
        min-height: 100px;
        padding: 12px;
    }

    .payment-title {
        font-size: 17px;
        margin-bottom: 24px;
        color: #888b8e;
        font-weight: 600;
        text-align: start;
    }

    .payment-name {
        font-size: 12px;
    }

    .payment-subtitle {
        font-size: 10px;
        padding-left: 24px;
        line-height: 1.2;
    }

    .payment-icon {
        width: 18px;
        height: 18px;
    }

    .payment-left {
        gap: 6px;
    }

    .payment-header {
        margin-bottom: 8px;
    }

    .radio-button {
        width: 16px;
        height: 16px;
    }

    .radio-dot {
        width: 6px;
        height: 6px;
    }
    
    .payment-selection {
        padding: 20px;
    }
}

/* Responsive Design - Very Small Mobile */
@media (max-width: 360px) {
    .payment-steps {
        gap: 30px;
        padding: 20px 5px;
    }
    
    .payment-steps::before {
        width: calc(100% - 50px);
    }
    
    .step p.lineItems {
        font-size: 10px;
        max-width: 60px;
    }
    
    .svg-container {
        width: 32px;
        height: 32px;
    }
    
    .svg-container svg {
        width: 18px;
        height: 18px;
    }
    
    .svg-container i {
        font-size: 14px;
    }
    
    .svg-container p {
        font-size: 14px !important;
    }

    .payment-selection {
        padding: 20px 15px;
    }
}

/* Ultra Small Screens */
@media (max-width: 320px) {
    .payment-steps {
        gap: 25px;
        padding: 15px 5px;
    }
    
    .payment-steps::before {
        width: calc(100% - 40px);
    }
    
    .step p.lineItems {
        font-size: 9px;
        max-width: 50px;
    }
    
    .svg-container {
        width: 30px;
        height: 30px;
    }
    
    .svg-container svg {
        width: 16px;
        height: 16px;
    }
    
    .svg-container i {
        font-size: 12px;
    }
    
    .svg-container p {
        font-size: 12px !important;
    }

    .payment-selection {
        padding: 15px 5px;
    }

    .pay-button {
        padding: 16px 30px;
        font-size: 16px;
    }

    .payment-grid {
        gap: 6px;
    }

    .payment-method {
        padding: 8px;
        min-height: 90px;
    }

    .payment-name {
        font-size: 11px;
    }

    .payment-subtitle {
        font-size: 9px;
        padding-left: 20px;
    }

    .payment-icon {
        width: 16px;
        height: 16px;
    }

    .radio-button {
        width: 14px;
        height: 14px;
    }

    .radio-dot {
        width: 5px;
        height: 5px;
    }
}

/* ===== MOBILE STYLES - ADDED AT END TO OVERRIDE ALL OTHERS ===== */
@media (max-width: 520px) {
    /* Hide step text labels on mobile - keep the visual circles */
    .step p.lineItems {
        display: none !important;
    }
    
    .payment-steps {
        padding: 30px 10px;
    }
    
    /* Force single column layout on mobile - combine both grids */
    .payment-grid-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .payment-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin-bottom: 0 !important;
    }
    
    .payment-method {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px;
        min-height: auto;
        border-radius: 12px;
        margin: 0 !important;
    }
    
    /* PayPal Hero Treatment */
    .payment-method.paypal-method {
        order: -1;
        border: 2px solid #a855f7;
        background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
        box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
        position: relative;
        margin-bottom: 24px;
        padding: 24px;
    }
    
    .payment-method.paypal-method::before {
        content: "🔥 Recommended";
        position: absolute;
        top: -10px;
        left: 20px;
        background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
        color: white;
        padding: 6px 16px;
        border-radius: 16px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
    }
    
    .payment-method.paypal-method .payment-name {
        font-size: 18px;
        font-weight: 700;
        color: #7c3aed;
    }
    
    .payment-method.paypal-method .payment-subtitle {
        color: #7c3aed;
        font-weight: 600;
        font-size: 14px;
    }
    
    .payment-method.paypal-method .payment-icon {
        color: #a855f7;
        width: 28px;
        height: 28px;
    }
    
    .payment-method.paypal-method .radio-button {
        border-color: #a855f7;
        width: 22px;
        height: 22px;
    }
    
    /* Hide specific disabled methods on mobile */
    .payment-method[data-method="cash2code"],
    .payment-method[data-method="phone"] {
        display: none !important;
    }
    
    /* Disabled methods as compact secondary rows */
    .payment-method.disabled {
        opacity: 0.4;
        transform: none;
        padding: 12px 16px;
        margin-bottom: 6px;
        min-height: 60px;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
    }
    
    .payment-method.disabled .payment-name {
        font-size: 13px;
        color: #6c757d;
    }
    
    .payment-method.disabled .payment-subtitle {
        font-size: 11px;
        color: #6c757d;
        font-style: italic;
        margin-top: 2px;
    }
    
    .payment-method.disabled .payment-icon {
        width: 18px;
        height: 18px;
        color: #adb5bd;
    }
    
    .payment-method.disabled .radio-button {
        width: 16px;
        height: 16px;
    }
    
    .payment-method.disabled .payment-left {
        gap: 8px;
    }
    
    /* Section adjustments */
    .payment-selection {
        padding: 24px 16px;
    }
    
    .payment-title {
        font-size: 17px;
        margin-bottom: 24px;
        color: #888b8e;
        font-weight: 600;
        text-align: start;
    }
    
    .payment-main {
        padding: 20px 0;
    }
    
    /* Action buttons full width */
    .action-buttons {
        margin-top: 32px;
        padding-top: 24px;
        flex-direction: column;
        gap: 16px;
    }
    
    .pay-button {
        width: 100%;
        padding: 18px;
        font-size: 16px;
        font-weight: 700;
        order: -1;
    }
    
    .cancel-button {
        text-align: center;
        font-size: 14px;
        color: #6b7280;
    }
}

/* Extra small mobile adjustments - FINAL OVERRIDE */
@media (max-width: 360px) {
    .payment-method.paypal-method::before {
        font-size: 10px;
        padding: 5px 12px;
        left: 16px;
    }
    
    .payment-method.paypal-method {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    
    .payment-method.disabled {
        padding: 10px 14px;
        min-height: 50px;
        margin-bottom: 4px;
    }
    
    .payment-method.disabled .payment-name {
        font-size: 12px;
    }
    
    .payment-method.disabled .payment-subtitle {
        font-size: 10px;
    }
    
    .payment-method.disabled .payment-icon {
        width: 16px;
        height: 16px;
    }
    
    .payment-method.disabled .radio-button {
        width: 14px;
        height: 14px;
    }
    
    .payment-selection {
        padding: 20px 12px;
    }
    
    .payment-title {
        font-size: 17px;
        margin-bottom: 24px;
        color: #888b8e;
        font-weight: 600;
        text-align: start;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .svg-container {
        border-width: 3px;
    }
    
    .payment-steps::before {
        height: 2px;
        background-color: #000;
    }

    .payment-method {
        border-width: 2px;
    }
    
    .payment-method.selected {
        border-color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .svg-container,
    .payment-method,
    .pay-button,
    .cancel-button {
        transition: none;
    }
    
    .svg-container:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .payment-steps {
        gap: 80px;
    }
    
    .payment-steps::before {
        background-color: #000;
    }
    
    .svg-container {
        border-color: #000;
        box-shadow: none;
    }

    .payment-method {
        border: 1px solid #000;
    }

    .pay-button,
    .cancel-button {
        display: none;
    }
}

/* Error States */
.error-container {
    text-align: center;
    padding: 40px 20px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 32px;
}

.error-title {
    font-size: 24px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.error-message {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Expiry Warning */
.expiry-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #92400e;
    font-weight: 500;
}

.warning-icon {
    font-size: 20px;
} 

 