/**
 * Styles for Barar Bangladeshi Payment.
 *
 * @package Barar_Bangladeshi_Payment
 * @author  Atik Hosen
 * @license GPL v2 or later
 */

/* ---------------------------------------------
   GATEWAY LIST ALIGNMENT
   --------------------------------------------- */
.barar-gateway-icon {
    display: inline-block;
    vertical-align: middle;
    max-height: 35px;
    width: auto;
}

/* ---------------------------------------------
   PAYMENT FIELDS CONTAINER
   --------------------------------------------- */
.barar-payment-fields {
    margin-top: 15px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.barar-payment-fields .barar-payment-info {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

/* ---------------------------------------------
   MERCHANT NUMBER - CLICK TO COPY
   --------------------------------------------- */
.barar-merchant-number {
    margin-bottom: 12px;
    font-size: 14px;
}

.barar-merchant-number strong {
    display: block;
    margin-bottom: 5px;
}

.barar-copy-number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    user-select: all;
}

.barar-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: #7f54b3;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
    line-height: 1.4;
}

.barar-copy-btn:hover {
    background: #663d9c;
}

.barar-copy-btn:focus {
    outline: 2px solid #7f54b3;
    outline-offset: 2px;
}

.barar-copied-feedback {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #27ae60;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.barar-copied-feedback.barar-copied-visible {
    opacity: 1;
}

/* ---------------------------------------------
   QR CODE
   --------------------------------------------- */
.barar-qr-wrapper {
    margin-bottom: 12px;
    text-align: center;
}

.barar-qr-image {
    max-width: 200px;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* ---------------------------------------------
   INSTRUCTION BOX
   --------------------------------------------- */
.barar-instruction-box {
    padding: 12px 15px;
    margin-bottom: 12px;
    background: #f0f4ff;
    border-left: 4px solid #7f54b3;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.barar-instruction-box p {
    margin: 0 0 8px;
}

.barar-instruction-box p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------
   PROOF METHOD SELECTION
   --------------------------------------------- */
.barar-proof-selection {
    margin-bottom: 10px;
}

.barar-proof-options {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.barar-proof-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
}

.barar-proof-option input[type="radio"] {
    margin: 0;
}

/* ---------------------------------------------
   CUSTOMER INPUT FIELDS
   --------------------------------------------- */
.barar-customer-fields .form-row {
    margin-bottom: 12px;
}

.barar-customer-fields input[type="tel"],
.barar-customer-fields input[type="text"],
.barar-customer-fields input[type="file"] {
    width: 100%;
}

.barar-field-note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

/* ---------------------------------------------
   THANK-YOU PAGE
   --------------------------------------------- */
.barar-thankyou-details {
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.barar-thankyou-heading {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #2c3e50;
}

.barar-payment-details-table {
    margin-top: 10px;
}

.barar-payment-details-table p {
    margin: 0 0 8px;
    font-size: 14px;
}

.barar-payment-details-table code {
    padding: 2px 6px;
    font-size: 13px;
    background: #f0f0f0;
    border-radius: 3px;
}

/* ---------------------------------------------
   SCREENSHOT PREVIEW
   --------------------------------------------- */
.barar-screenshot-preview {
    margin-top: 8px;
}

.barar-screenshot-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ---------------------------------------------
   ADMIN ORDER DETAILS
   --------------------------------------------- */
.barar-admin-order-details h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.barar-admin-order-details p {
    margin: 0 0 6px;
    font-size: 13px;
}

.barar-admin-order-details code {
    padding: 1px 5px;
    font-size: 12px;
    background: #f0f0f0;
    border-radius: 3px;
}

/* ---------------------------------------------
   ORDER LIST COLUMNS
   --------------------------------------------- */
.barar-screenshot-link {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    color: #fff;
    background: #7f54b3;
    border-radius: 3px;
    text-decoration: none;
}

.barar-screenshot-link:hover {
    background: #663d9c;
    color: #fff;
}

/* ---------------------------------------------
    SCREENSHOT UPLOAD STATUS
    --------------------------------------------- */
.barar-upload-status {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.barar-upload-status.barar-upload-loading {
    color: #856404;
    background: #fff3cd;
}

.barar-upload-status.barar-upload-success {
    color: #155724;
    background: #d4edda;
}

.barar-upload-status.barar-upload-error {
    color: #721c24;
    background: #f8d7da;
}

/* ---------------------------------------------
    RESPONSIVE
    --------------------------------------------- */
/* ---------------------------------------------
   SCREENSHOT LIGHTBOX
   --------------------------------------------- */
.barar-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.barar-lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.barar-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.barar-lightbox-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .barar-proof-options {
        flex-direction: column;
        gap: 8px;
    }

    .barar-copy-number {
        flex-wrap: wrap;
    }

    .barar-qr-image {
        max-width: 150px;
    }
}

/* ---------------------------------------------
   TXID CLICK-TO-COPY
   --------------------------------------------- */
.barar-txid-copy {
    display: inline-block;
    padding: 1px 6px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    cursor: pointer;
    user-select: all;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.barar-txid-copy:hover {
    background: #dcdcde;
    border-color: #8c8f94;
}

.barar-txid-copy:active {
    background: #c3c4c7;
}

/* ---------------------------------------------
   SCREENSHOT MODAL
   --------------------------------------------- */
.barar-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.barar-modal-overlay.barar-modal-open {
    display: flex;
}

.barar-modal-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barar-modal-image {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.barar-modal-close {
    position: fixed;
    top: 20px;
    right: 30px;
    width: 44px;
    height: 44px;
    font-size: 32px;
    line-height: 44px;
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    z-index: 1000000;
    padding: 0;
}

.barar-modal-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.barar-modal-close:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---------------------------------------------
   TOAST NOTIFICATION
   --------------------------------------------- */
.barar-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: #2c3e50;
    border-radius: 4px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.25);
    z-index: 1000001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(10px);
    white-space: nowrap;
}

.barar-toast.barar-toast-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .barar-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
        line-height: 36px;
    }

    .barar-toast {
        bottom: 20px;
        font-size: 12px;
        padding: 8px 16px;
        white-space: normal;
        max-width: 85vw;
        text-align: center;
    }
}
