/**
 * WooCommerce GestorPay Gateway - Frontend Styles
 *
 * @package WooCommerce_GestorPay
 * @author Jonas Souza
 * @since 1.0.0
 */

/* Payment method description */
.gestorpay-description {
    margin: 12px 0;
    padding: 16px;
    background: #F1F4F7;
    border-radius: 8px;
    border-left: 4px solid #4187FD;
    color: #0F172A;
    font-size: 14px;
    line-height: 1.5;
}

/* Test mode notice */
.gestorpay-testmode-notice {
    background: #fef9e7;
    border: 1px solid #f39c12;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    color: #0F172A;
}

.gestorpay-testmode-notice p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

/* Payment form container */
.gestorpay-payment-form {
    margin: 16px 0;
}

/* PIX info section */
.gestorpay-pix-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: #FFFFFF;
    border: 2px solid #F1F4F7;
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.gestorpay-pix-info:hover {
    border-color: #4187FD;
}

.gestorpay-pix-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4187FD, #2563eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.gestorpay-pix-icon::before {
    content: "PIX";
    color: #FFFFFF;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.gestorpay-pix-text h4 {
    margin: 0 0 8px 0;
    color: #0F172A;
    font-size: 16px;
    font-weight: 600;
}

.gestorpay-pix-text p {
    margin: 0 0 12px 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.gestorpay-pix-text ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gestorpay-pix-text li {
    color: #27ae60;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Thank you page styles */
.gestorpay-pix-instructions {
    background: #FFFFFF;
    border: 2px solid #F1F4F7;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.gestorpay-pix-instructions h3 {
    margin: 0 0 24px 0;
    color: #0F172A;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 2px solid #F1F4F7;
}

.gestorpay-pix-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

/* QR Code section */
.gestorpay-qr-code {
    text-align: center;
}

.gestorpay-qr-code h4 {
    margin: 0 0 16px 0;
    color: #0F172A;
    font-size: 16px;
    font-weight: 600;
}

.gestorpay-qr-image {
    background: #FFFFFF;
    border: 2px solid #F1F4F7;
    border-radius: 12px;
    padding: 20px;
    display: inline-block;
}

.gestorpay-qr-image img {
    max-width: 200px;
    height: auto;
    display: block;
}

/* PIX code copy section */
.gestorpay-pix-copy h4 {
    margin: 0 0 16px 0;
    color: #0F172A;
    font-size: 16px;
    font-weight: 600;
}

.gestorpay-code-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.gestorpay-code-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #F1F4F7;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background: #F1F4F7;
    color: #0F172A;
    word-break: break-all;
}

.gestorpay-copy-btn {
    background: #4187FD;
    color: #FFFFFF;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gestorpay-copy-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(65, 135, 253, 0.3);
}

.gestorpay-copy-btn:active {
    transform: translateY(0);
}

/* Instructions text */
.gestorpay-instructions-text {
    background: #F1F4F7;
    border-radius: 12px;
    padding: 24px;
}

.gestorpay-instructions-text h4 {
    margin: 0 0 16px 0;
    color: #0F172A;
    font-size: 16px;
    font-weight: 600;
}

.gestorpay-instructions-text ol {
    margin: 0 0 24px 0;
    padding-left: 20px;
}

.gestorpay-instructions-text li {
    color: #0F172A;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Payment info */
.gestorpay-payment-info {
    background: #FFFFFF;
    border: 2px solid #4187FD;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.gestorpay-payment-info p {
    margin: 0 0 8px 0;
    color: #0F172A;
    font-size: 14px;
}

.gestorpay-payment-info p:last-child {
    margin-bottom: 0;
}

/* Status check section */
.gestorpay-status-check {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.gestorpay-status-check p {
    margin: 0 0 16px 0;
    color: #64748b;
    font-size: 14px;
}

.gestorpay-status-check .button {
    background: #FFFFFF;
    border: 2px solid #4187FD;
    color: #4187FD;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.gestorpay-status-check .button:hover {
    background: #4187FD;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(65, 135, 253, 0.3);
}

/* Loading states */
.gestorpay-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gestorpay-loading-content {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    max-width: 300px;
}

.gestorpay-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #F1F4F7;
    border-top: 4px solid #4187FD;
    border-radius: 50%;
    animation: gestorpay-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes gestorpay-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gestorpay-loading-text {
    color: #0F172A;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Error states */
.gestorpay-error {
    background: #fdf2f2;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #0F172A;
}

.gestorpay-error p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Success states */
.gestorpay-success {
    background: #eafaf1;
    border: 2px solid #27ae60;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #0F172A;
}

.gestorpay-success p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .gestorpay-pix-info {
        flex-direction: column;
        text-align: center;
    }
    
    .gestorpay-pix-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .gestorpay-code-container {
        flex-direction: column;
    }
    
    .gestorpay-qr-image img {
        max-width: 150px;
    }
    
    .gestorpay-pix-instructions {
        padding: 16px;
    }
    
    .gestorpay-instructions-text {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .gestorpay-pix-instructions h3 {
        font-size: 18px;
    }
    
    .gestorpay-qr-image img {
        max-width: 120px;
    }
    
    .gestorpay-code-container input {
        font-size: 10px;
        padding: 10px 12px;
    }
}

/* Animation for success feedback */
.gestorpay-copied-feedback {
    background: #27ae60;
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: gestorpay-fade-in-out 2s ease-in-out;
    pointer-events: none;
}

@keyframes gestorpay-fade-in-out {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Payment method selection enhancement */
.wc_payment_method.payment_method_gestorpay {
    border: 2px solid #F1F4F7;
    border-radius: 8px;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.wc_payment_method.payment_method_gestorpay:hover {
    border-color: #4187FD;
}

.wc_payment_method.payment_method_gestorpay input[type="radio"]:checked + label {
    color: #4187FD;
    font-weight: 600;
}

/* PIX icon enhancement */
.gestorpay-pix-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #27ae60;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
}
