/* VietQR Generator Plugin Styles */

/* Main Container */
.vietqr-generator-wrap {
    padding: 30px 0;
    width: 100%;
    margin: auto;
}

.vietqr-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Form Styles */
.vietqr-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.vietqr-title {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.vietqr-field {
    margin-bottom: 15px;
}

.vietqr-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.vietqr-field input,
.vietqr-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.vietqr-field input:focus,
.vietqr-field select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Select2 Overrides */
.vietqr-generator-wrap .select2-container {
    width: 100% !important;
    margin-bottom: 0;
}

.vietqr-generator-wrap .select2-container .select2-selection--single,
.vietqr-generator-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
}

.vietqr-generator-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 15px;
}

.vietqr-generator-wrap .select2-container--default .select2-selection--single {
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Button Styles */
.vietqr-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.vietqr-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.vietqr-button:active {
    transform: translateY(0);
}

.vietqr-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Loader */
.vietqr-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vietqr-spin 0.8s linear infinite;
    margin-left: 10px;
}

.vietqr-button.loading .vietqr-loader {
    display: inline-block;
}

@keyframes vietqr-spin {
    to { transform: rotate(360deg); }
}

/* Result Section */
.vietqr-result {
    flex: 0 0 350px;
    max-width: 400px;
}

.vietqr-result-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

#vietqr-qrcode {
    background: #fff;
    /* border: 1px solid #e8e8e8; */
    border-radius: 8px;
    /* padding: 15px; */
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#vietqr-qrcode img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

#vietqr-qrcode canvas {
    max-width: 100%;
    height: auto !important;
}

/* Download Button */
.vietqr-download {
    margin-top: 15px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.vietqr-download:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    color: #fff;
}

#vietqr-download-wrap {
    text-align: center;
}

/* Bank Info Display */
.vietqr-bank-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.vietqr-bank-info p {
    margin: 5px 0;
}

.vietqr-bank-info strong {
    color: #333;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .vietqr-container {
        flex-direction: column;
    }
    
    .vietqr-form,
    .vietqr-result {
        max-width: 100%;
        flex: 1 1 100%;
    }
    
    .vietqr-result {
        margin-top: 20px;
    }
}

@media screen and (max-width: 480px) {
    .vietqr-generator-wrap {
        padding: 20px 0;
    }
    
    .vietqr-title {
        font-size: 20px;
    }
    
    .vietqr-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Error/Success Messages */
.vietqr-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.vietqr-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vietqr-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Placeholder State */
.vietqr-placeholder {
    color: #999;
    font-size: 14px;
}

/* Loading Spinner in QR area */
.vietqr-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: vietqr-spin 0.8s linear infinite;
    margin: 50px auto;
}

