/**
 * Secure Paid Flipbook - Checkout, Modal & Purchase Interface Styles
 * @package SecurePaidFlipbook
 */

/* Purchase & Download Showcase Card */
.spf-purchase-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
    margin-top: 32px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.spf-purchase-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.08), 0 6px 10px -3px rgba(15, 23, 42, 0.04);
}

.spf-purchase-details {
    flex: 1;
}

.spf-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.spf-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    flex-shrink: 0;
}

.spf-overview-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.spf-overview-body {
    font-size: 14.5px;
    color: #475569;
    line-height: 1.7;
}

.spf-overview-body p {
    margin: 0 0 10px 0;
}

.spf-overview-body p:last-child {
    margin-bottom: 0;
}

.spf-overview-body a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
    padding-bottom: 1px;
}

.spf-overview-body a:hover {
    color: #0369a1;
    border-bottom-color: #0284c7;
}

.spf-security-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.spf-purchase-heading {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.spf-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spf-benefits-list li {
    font-size: 14px;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spf-benefits-list li:last-child {
    margin-bottom: 0;
}

.spf-check {
    color: #16a34a;
    font-weight: 800;
}

.spf-purchase-action {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 8px rgba(15, 23, 42, 0.04);
}

.spf-price-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 0;
}

.spf-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #64748b;
    margin-bottom: 8px;
}

.spf-price-row strong {
    color: #0f172a;
    font-weight: 700;
}

.spf-price-row-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 800;
    color: #0284c7;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1.5px solid #e2e8f0;
}

.spf-price-row-total strong {
    color: #0284c7;
    font-size: 18px;
    font-weight: 800;
}

.spf-price-label {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.spf-price-value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

.spf-btn-purchase {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.spf-btn-purchase:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
    transform: translateY(-2px);
}

.spf-btn-purchase:active {
    transform: translateY(0);
}

.spf-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-top: 0;
}

/* Modal Checkout Overlay & Dialog */
.spf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    box-sizing: border-box;
}

.spf-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spf-modal-box {
    background: #ffffff;
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    padding: 24px 28px;
    box-sizing: border-box;
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.spf-modal-box::-webkit-scrollbar {
    width: 6px;
}

.spf-modal-box::-webkit-scrollbar-track {
    background: transparent;
}

.spf-modal-box::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.spf-modal-overlay.active .spf-modal-box {
    transform: scale(1);
}

.spf-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.spf-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.spf-modal-step {
    display: none;
}

.spf-modal-step.active {
    display: block;
}

.spf-modal-header {
    margin-bottom: 16px;
    padding-right: 36px;
    text-align: left;
}

.spf-modal-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spf-modal-icon {
    font-size: 26px;
    background: #eff6ff;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spf-modal-title {
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.spf-modal-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
}

/* Order Summary */
.spf-checkout-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.spf-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 4px;
}

.spf-summary-row.spf-gst-row {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #cbd5e1;
}

.spf-summary-row.spf-total-row {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.spf-total-amount {
    color: #0284c7;
    font-size: 16px;
    font-weight: 800;
}

/* 2-Column Form Grid Layout */
.spf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.spf-col-full {
    grid-column: 1 / -1;
}

.spf-form-group {
    margin-bottom: 0;
}

.spf-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.spf-sublabel {
    font-weight: 400;
    font-size: 11px;
    color: #64748b;
}

.spf-req {
    color: #ef4444;
    font-weight: 700;
}

.spf-form-group input,
.spf-form-group select,
.spf-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}

.spf-form-group textarea {
    resize: vertical;
    min-height: 52px;
}

.spf-form-group input:focus,
.spf-form-group select:focus,
.spf-form-group textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.spf-form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
    padding: 10px 14px;
    font-size: 12.5px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.spf-btn-pay-submit {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.spf-btn-pay-submit:hover {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
    transform: translateY(-1px);
}

/* Processing Step */
.spf-step-processing {
    text-align: center;
    padding: 24px 0;
}

.spf-spinner.large {
    width: 48px;
    height: 48px;
    border-width: 4px;
    border-color: #e2e8f0;
    border-top-color: #0284c7;
    margin: 0 auto 16px auto;
}

.spf-step-processing h3 {
    font-size: 18px;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.spf-step-processing p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Success Step */
.spf-step-success {
    text-align: center;
}

.spf-success-badge {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 28px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.spf-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.spf-success-msg {
    font-size: 13px;
    color: #475569;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.spf-order-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    text-align: left;
}

.spf-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}

.spf-info-k {
    color: #64748b;
}

.spf-info-v {
    font-weight: 600;
    color: #0f172a;
}

.spf-btn-download-now {
    background: #16a34a;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.25);
}

.spf-btn-download-now:hover {
    background: #15803d;
}

.spf-security-footnote {
    font-size: 11px;
    color: #94a3b8;
    margin: 16px 0 0 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .spf-purchase-card {
        flex-direction: column;
        padding: 20px;
    }
    
    .spf-purchase-action {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .spf-form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 640px) {
    .spf-modal-box {
        padding: 20px 16px;
        max-height: 94vh;
    }

    .spf-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .spf-modal-subtitle {
        white-space: normal;
    }
}

/* EazyPay Payment Return Alert Card */
.spf-return-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 20px 0 28px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    font-family: inherit;
}

.spf-alert-success {
    background-color: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #166534;
}

.spf-alert-error {
    background-color: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

.spf-alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.spf-alert-success .spf-alert-icon {
    color: #16a34a;
}

.spf-alert-error .spf-alert-icon {
    color: #dc2626;
}

.spf-alert-content {
    flex: 1;
}

.spf-alert-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: inherit;
}

.spf-alert-msg {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    color: inherit;
    font-weight: 500;
}

.spf-alert-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
}

.spf-alert-details span {
    display: inline-flex;
    gap: 6px;
}
