/*!
* Relacional (rx.payment.css)
* Version: 1.0.0
* Build date: Thu Oct 23 2025
*
* Copyright (c) 2025 Relacional ALL RIGHTS RESERVED
* Read about Relacional licensing here: https://relacional.com.br/
*/

.rx-payment-processor * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.rx-payment-processor {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 10000;
}

.rx-payment-processor .checkout-container {
    background: #fff;
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.rx-payment-processor .checkout-header {
    background: #2d3192;
    padding: 20px;
    text-align: center;
    color: #fff;
}

.rx-payment-processor .checkout-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.rx-payment-processor .checkout-header p {
    font-size: 15px;
    opacity: 0.95;
}

.rx-payment-processor .checkout-body {
    padding: 60px;
    position: relative;
}

.rx-payment-processor .progress-container {
    max-width: 600px;
    margin: 0 auto;
}

.rx-payment-processor .payment-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
}

.rx-payment-processor .loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid #e5e7eb;
    border-top: 6px solid #2d3192;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 40px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rx-payment-processor .loading-text {
    font-size: 24px;
    font-weight: 700;
    color: #2d3192;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.rx-payment-processor .loading-message {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    min-height: 24px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.rx-payment-processor .result-section {
    display: none;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.rx-payment-processor .result-section.show {
    display: block;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rx-payment-processor .result-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.rx-payment-processor .result-section.success .result-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
}

.rx-payment-processor .result-section.error .result-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.3);
}

.rx-payment-processor .result-icon svg {
    width: 55px;
    height: 55px;
    fill: #fff;
    display: block;
    margin: 0 auto;
}

.rx-payment-processor .result-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rx-payment-processor .result-section.success h2 {
    color: #065f46;
}

.rx-payment-processor .result-section.error h2 {
    color: #991b1b;
}

.rx-payment-processor .result-section p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.rx-payment-processor .receipt-container {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.rx-payment-processor .receipt-header {
    background: linear-gradient(135deg, #2d3192 0%, #1e2470 100%);
    padding: 14px 20px;
    text-align: center;
    border-bottom: 2px solid #1a1d5a;
}

.rx-payment-processor .receipt-header h3 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rx-payment-processor .receipt-date {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-weight: 500;
}

.rx-payment-processor .receipt-body {
    padding: 16px 20px;
}

.rx-payment-processor .receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.rx-payment-processor .receipt-row:last-child {
    border-bottom: none;
}

.rx-payment-processor .receipt-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.rx-payment-processor .receipt-value {
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.rx-payment-processor .receipt-status {
    color: #10b981;
    background: #f0fdf4;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

.rx-payment-processor .receipt-amount {
    background: #f9fafb;
    margin: 0 -20px;
    padding: 12px 20px;
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
}

.rx-payment-processor .receipt-amount .receipt-label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.rx-payment-processor .receipt-amount .receipt-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d3192;
}

.rx-payment-processor .receipt-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 0;
}

.rx-payment-processor .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

.rx-payment-processor .btn {
    padding: 14px 10px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.rx-payment-processor .btn span {
    position: relative;
    z-index: 1;
}

.rx-payment-processor .btn-primary {
    background: #2d3192;
    color: #fff;
}

.rx-payment-processor .btn-primary:hover {
    background: #ec1f24;
}

.rx-payment-processor .btn-secondary {
    background: #fff;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.rx-payment-processor .btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.rx-payment-processor .simulation-panel {
    margin-top: 40px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.rx-payment-processor .simulation-panel h4 {
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

.rx-payment-processor .sim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.rx-payment-processor .btn-sim {
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #374151;
}

.rx-payment-processor .btn-sim:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rx-payment-processor .btn-sim.success {
    border-color: #10b981;
    color: #065f46;
    background: #f0fdf4;
}

.rx-payment-processor .btn-sim.success:hover {
    background: #dcfce7;
    border-color: #059669;
}

.rx-payment-processor .btn-sim.error {
    border-color: #ef4444;
    color: #991b1b;
    background: #fef2f2;
}

.rx-payment-processor .btn-sim.error:hover {
    background: #fee2e2;
    border-color: #dc2626;
}

@media (max-width: 768px) {
    .rx-payment-processor {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        overflow-y: auto;
    }

    .rx-payment-processor .checkout-container {
        max-width: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .rx-payment-processor .checkout-header {
        flex-shrink: 0;
        padding: 20px 20px;
    }

    .rx-payment-processor .checkout-header h1 {
        font-size: 22px;
    }

    .rx-payment-processor .checkout-header p {
        font-size: 14px;
    }

    .rx-payment-processor .checkout-body {
        flex: 1;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .rx-payment-processor .progress-container {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .rx-payment-processor .payment-loading {
        padding-top: 100px;
    }

    .rx-payment-processor .result-section {
        max-width: 100%;
        padding: 0 10px;
    }

    .rx-payment-processor .result-section.error {
        padding-top: 100px;
    }

    .rx-payment-processor .result-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .rx-payment-processor .result-icon svg {
        width: 45px;
        height: 45px;
    }

    .rx-payment-processor .result-section h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .rx-payment-processor .result-section p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .rx-payment-processor .receipt-container {
        margin: 20px 0;
    }

    .rx-payment-processor .receipt-header h3 {
        font-size: 14px;
    }

    .rx-payment-processor .receipt-date {
        font-size: 11px;
    }

    .rx-payment-processor .receipt-label,
    .rx-payment-processor .receipt-value {
        font-size: 12px;
    }

    .rx-payment-processor .receipt-amount .receipt-label {
        font-size: 13px;
    }

    .rx-payment-processor .receipt-amount .receipt-value {
        font-size: 16px;
    }

    .rx-payment-processor .btn-group {
        margin-top: 24px;
        gap: 10px;
    }

    .rx-payment-processor .btn {
        padding: 12px 8px;
        font-size: 12px;
    }

    .finalization-wrapper {
        width: 100%;
        height: 100%;
    }

    #payment-processing {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 375px) {
    .rx-payment-processor .checkout-header {
        padding: 15px;
    }

    .rx-payment-processor .checkout-body {
        padding: 20px 15px;
    }

    .rx-payment-processor .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .rx-payment-processor .loading-text {
        font-size: 18px;
    }

    .rx-payment-processor .result-section h2 {
        font-size: 20px;
    }
}