/**
 * GHL Payment Gateway CSS
 */
/* GHL Payment Gateway Styles */
body, .ghl-payment-container {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #495057;
}

.ghl-payment-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
}

.ghl-payment-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.ghl-payment-card:hover {
    transform: translateY(-5px);
}

.ghl-payment-container h2 {
    color: #3a3a3a;
    font-weight: 500;
    margin-bottom: 25px;
}

.ghl-qr-container {
    position: relative;
    margin: 15px 0 30px;
    display: inline-block;
}

.ghl-qr-image {
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.ghl-payment-prompt {
    color: #2C3E50;
    font-size: 1.1em;
    margin: 20px 0;
    padding: 15px;
    background: #EBF5FB;
    border-radius: 6px;
    border-left: 4px solid #3498DB;
}

.ghl-payment-details {
    margin-top: 20px;
    text-align: left;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.ghl-payment-form-container {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ghl-payment-form {
    margin-top: 20px;
    text-align: left;
}

.ghl-payment-form-field {
    margin-bottom: 20px;
}

.ghl-payment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.ghl-payment-form input[type="text"],
.ghl-payment-form input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.ghl-payment-form input[type="text"]:focus,
.ghl-payment-form input[type="number"]:focus {
    border-color: #3498DB;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.ghl-payment-form-submit {
    text-align: center;
    margin-top: 25px;
}

.ghl-payment-form input[type="submit"],
.ghl-button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    display: inline-block;
    text-decoration: none;
}

.ghl-payment-form input[type="submit"]:hover,
.ghl-button:hover {
    background-color: #388E3C;
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.ghl-payment-result {
    margin-top: 20px;
}

.ghl-status-section {
    margin-top: 30px;
    padding: 15px;
    border-radius: 8px;
    background: #f5f7fa;
}

.ghl-status-message {
    font-size: 18px;
    margin: 10px 0;
    font-weight: 500;
    padding: 12px 15px;
    border-radius: 8px;
    display: inline-block;
}

.ghl-status-success {
    color: white;
    background-color: #4CAF50;
}

.ghl-status-error {
    color: white;
    background-color: #F44336;
}

.ghl-status-waiting {
    color: white;
    background-color: #FF9800;
}

.ghl-loading {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 15px;
    vertical-align: middle;
    margin-left: 10px;
}

.ghl-loading div {
    position: absolute;
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: white;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.ghl-loading div:nth-child(1) {
    left: 8px;
    animation: ghl-loading1 0.6s infinite;
}

.ghl-loading div:nth-child(2) {
    left: 8px;
    animation: ghl-loading2 0.6s infinite;
}

.ghl-loading div:nth-child(3) {
    left: 32px;
    animation: ghl-loading2 0.6s infinite;
}

.ghl-loading div:nth-child(4) {
    left: 56px;
    animation: ghl-loading3 0.6s infinite;
}

@keyframes ghl-loading1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes ghl-loading2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}

@keyframes ghl-loading3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

.ghl-payment-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.ghl-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.ghl-modal {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: ghl-modal-appear 0.3s ease;
}

@keyframes ghl-modal-appear {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ghl-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.ghl-modal-header h3 {
    margin: 0;
    font-weight: 500;
    color: #333;
}

.ghl-close-modal {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #777;
    transition: color 0.2s;
}

.ghl-close-modal:hover {
    color: #333;
}

.ghl-modal-body {
    padding: 20px;
}

.ghl-error-message {
    color: white;
    background-color: #F44336;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* สไตล์สำหรับ preset buttons */
.ghl-amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.ghl-preset-button {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ghl-preset-button:hover, .ghl-preset-button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* เพิ่ม CSS สำหรับปุ่ม Copy QR Code */
.ghl-copy-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    z-index: 10;
}

.ghl-copy-button:hover {
    background-color: #f1f1f1;
    border-color: #aaa;
}

.ghl-copy-button svg {
    width: 16px;
    height: 16px;
}

/* Toast Message */
.ghl-toast {
    visibility: hidden;
    min-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 10px 20px;
    position: fixed;
    z-index: 999;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}

.ghl-toast.show {
    visibility: visible;
    bottom: 50px;
    opacity: 1;
}

/* Loading animation in button */
.ghl-button-loading {
    display: inline-block;
    position: relative;
    width: 50px;
    height: 14px;
    vertical-align: middle;
}

.ghl-button-loading div {
    position: absolute;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.ghl-button-loading div:nth-child(1) {
    left: 0px;
    animation: ghl-button-loading1 0.6s infinite;
}

.ghl-button-loading div:nth-child(2) {
    left: 20px;
    animation: ghl-button-loading2 0.6s infinite;
}

.ghl-button-loading div:nth-child(3) {
    left: 40px;
    animation: ghl-button-loading3 0.6s infinite;
}

@keyframes ghl-button-loading1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes ghl-button-loading2 {
    0% { transform: translate(-10px, 0); }
    100% { transform: translate(10px, 0); }
}

@keyframes ghl-button-loading3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

/* สไตล์สำหรับ responsive */
@media (max-width: 767px) {
    .ghl-payment-card {
        padding: 20px;
    }
    
    .ghl-payment-container {
        padding: 10px;
    }
    
    .ghl-status-message {
        font-size: 16px;
        padding: 10px;
    }
    
    .ghl-payment-form-container {
        padding: 15px;
    }
    
    .ghl-payment-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ghl-button {
        width: 100%;
    }
    
    .ghl-copy-button {
        padding: 4px 8px;
        font-size: 12px;
    }
}