/**
 * InstaPay for WooCommerce - Public Styles
 */

/* Checkout Gateway Box */
.instapay-checkout-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    font-size: 14px;
    color: #1e293b;
}

.instapay-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.instapay-checkout-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.instapay-pill-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

/* Classic Checkout icon styling */
.woocommerce-checkout #payment ul.payment_methods li.payment_method_instapay > label img {
    max-height: 32px;
    width: auto;
    vertical-align: middle;
    margin-left: 8px;
    object-fit: contain;
}

.instapay-checkout-badge {
    display: inline-block;
    background: #581c87;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
}

.instapay-detail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.instapay-detail-row:last-of-type {
    border-bottom: none;
}

.instapay-label {
    font-weight: 600;
    color: #64748b;
    font-size: 13px;
}

.instapay-value {
    font-weight: 600;
    color: #0f172a;
}

.instapay-copy-group {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 4px 2px 8px;
    gap: 6px;
}

.instapay-copyable-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.instapay-btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #581c87;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.instapay-btn-copy:hover {
    background: #4c1d95;
    transform: translateY(-1px);
}

.instapay-btn-copy.instapay-copied {
    background: #16a34a !important;
}

.instapay-checkout-notice {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #cbd5e1;
    font-size: 12px;
    color: #475569;
}

.instapay-checkout-notice p {
    margin: 0;
}

/* Thank You & Order View Card */
.instapay-receipt-section {
    margin: 24px 0 32px 0;
    clear: both;
}

.instapay-receipt-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.instapay-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.instapay-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    color: #581c87;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 9999px;
}

.instapay-pill-dot {
    width: 8px;
    height: 8px;
    background: #9333ea;
    border-radius: 50%;
}

.instapay-order-ref-badge {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Transfer Grid */
.instapay-transfer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.instapay-grid-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.instapay-meta-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instapay-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}

.instapay-amount-highlight {
    font-size: 20px;
    font-weight: 800;
    color: #581c87;
}

.instapay-qr-center {
    text-align: center;
    margin: 16px 0;
}

.instapay-qr-img {
    max-width: 160px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 4px;
    background: #ffffff;
}

.instapay-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
}

/* Status Alerts */
.instapay-status-alert {
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.instapay-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.instapay-status-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.instapay-status-icon {
    font-size: 18px;
}

.instapay-status-alert p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.instapay-alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.instapay-alert-warning .instapay-status-header h4 {
    color: #92400e;
}

.instapay-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.instapay-alert-info .instapay-status-header h4 {
    color: #1e40af;
}

.instapay-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.instapay-alert-success .instapay-status-header h4 {
    color: #166534;
}

.instapay-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.instapay-alert-danger .instapay-status-header h4 {
    color: #991b1b;
}

.instapay-rejection-box {
    background: #ffffff;
    border-left: 3px solid #dc2626;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 0 4px 4px 0;
    color: #7f1d1d;
    font-size: 13px;
}

.instapay-submitted-summary {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 12px;
}

.instapay-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.instapay-summary-row:last-child {
    border-bottom: none;
}

.instapay-view-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
}

/* Upload Form */
.instapay-upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.instapay-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.instapay-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.instapay-required {
    color: #dc2626;
}

.instapay-file-input {
    border: 1px dashed #cbd5e1;
    background: #ffffff;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.instapay-file-input:hover {
    border-color: #581c87;
}

.instapay-help-text {
    font-size: 11px;
    color: #64748b;
}

.instapay-text-input,
.instapay-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
}

.instapay-text-input:focus,
.instapay-textarea:focus {
    border-color: #581c87;
    outline: none;
    box-shadow: 0 0 0 2px rgba(88, 28, 135, 0.15);
}

.instapay-btn-submit {
    background: #581c87;
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.instapay-btn-submit:hover {
    background: #4c1d95;
    box-shadow: 0 4px 6px -1px rgba(88, 28, 135, 0.2);
}

@media (max-width: 640px) {
    .instapay-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .instapay-transfer-grid {
        grid-template-columns: 1fr;
    }

    .instapay-btn-submit {
        width: 100%;
        text-align: center;
    }
}
