/* PakPay Frontend Styles - Modern Design */

/* Main Checkout Form */
.pakpay-checkout-form {
    max-width: 500px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: #f7fafc;
    padding: 20px;
    border-radius: 0;
}



/* Instructions Box */
.instructions-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.instructions-text {
    color: #1e40af;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.025em;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748 !important;
    background: #fafafa;
    transition: all 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-select {
    cursor: pointer;
    z-index: 1;
    position: relative;
}

/* Ensure dropdown is visible in all browsers */
.form-select:focus {
    z-index: 10;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error,
.form-select.error {
    border-color: #e53e3e;
    background: #fef5f5;
}

/* Select Dropdown Options */
.form-select option {
    background: white !important;
    color: #2d3748 !important;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    border: none;
}

.form-select option:hover,
.form-select option:focus {
    background: #f7fafc !important;
    color: #1a202c !important;
}

.form-select option:checked {
    background: #667eea !important;
    color: white !important;
}

/* Ensure dropdown is visible */
.form-select:focus option {
    background: white !important;
    color: #2d3748 !important;
}

/* Force dropdown text visibility */
.form-select option {
    color: #2d3748 !important;
    background-color: white !important;
}

/* Additional styling for better visibility */
select.form-select {
    color: #2d3748 !important;
}

select.form-select option {
    color: #2d3748 !important;
    background-color: white !important;
}

/* Browser-specific fixes */
.form-select::-ms-expand {
    display: none;
}

/* Firefox specific */
.form-select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #2d3748;
}

/* Webkit browsers */
.form-select::-webkit-select-placeholder {
    color: #2d3748;
}

/* Ensure text is visible in all states */
.form-select,
.form-select option,
.form-select optgroup {
    color: #2d3748 !important;
    background-color: white !important;
}

/* Force text color for dropdown */
.form-select option {
    color: #2d3748 !important;
    background: white !important;
    text-shadow: none !important;
}

/* Account Details Section */
.account-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    gap: 12px;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.detail-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-weight: 600;
    color: #1a202c;
    font-size: 14px;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
    line-height: 1.4;
}

/* Copy Button */
.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 6px;
}

.copy-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-btn.copied {
    background: #38a169;
    transform: scale(1.05);
}

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

/* QR Code Section */
.qr-section {
    margin-bottom: 24px;
}

.qr-container {
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.qr-image {
    max-width: 180px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-label {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

/* File Upload Area */
.file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 18px 16px; /* reduced from 32px 20px */
    text-align: center;
    background: #fbfdff; /* slightly lighter */
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 110px; /* controlled compact height */
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f5f8ff;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* reduced gap */
    color: #4a5568;
    font-size: 13px; /* slightly smaller */
}

.upload-icon {
    font-size: 20px; /* smaller icon */
    color: #4f63e6; /* softer tone */
}

.file-hint {
    display: block;
    margin-top: 10px; /* slightly tighter */
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Error Messages */
.pakpay-error-message {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    color: #c53030;
}

.pakpay-error-message ul {
    margin: 0;
    padding-left: 20px;
}

.pakpay-error-message li {
    margin-bottom: 4px;
}

.pakpay-field-error {
    border-color: #e53e3e !important;
    background: #fef5f5 !important;
}

/* No Banks Available */
.pakpay-no-banks {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.no-banks-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.pakpay-no-banks h3 {
    color: #2d3748;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 600;
}

.pakpay-no-banks p {
    color: #718096;
    margin: 0;
    font-size: 16px;
}

/* License Notice Styles */
.pakpay-license-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.notice-icon {
    font-size: 48px;
    color: #856404;
    flex-shrink: 0;
}

.notice-text h3 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 24px;
    font-weight: 600;
}

.notice-text p {
    margin: 0;
    color: #856404;
    font-size: 16px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pakpay-checkout-form {
        padding: 16px;
        margin: 0 10px;
    }
    
    .form-container {
        padding: 24px;
    }
    
    .checkout-title {
        font-size: 24px;
    }
    
    .details-row {
        gap: 8px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .detail-content {
        width: 100%;
    }
    
    .detail-value {
        width: 100%;
        word-break: break-word;
    }
    
    .copy-btn {
        align-self: flex-end;
        margin-top: 0;
    }
    
    .qr-image {
        max-width: 150px;
    }
    .file-upload-area { min-height: 96px; padding: 14px; }
    .upload-icon { font-size: 18px; }
    .upload-text { font-size: 12px; }
    
    .notice-content {
        flex-direction: column;
        text-align: center;
    }
    
    .notice-icon {
        font-size: 36px;
    }
    
    .notice-text h3 {
        font-size: 20px;
    }
    
    .notice-text p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pakpay-checkout-form {
        padding: 12px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .checkout-title {
        font-size: 22px;
    }
    
    .instructions-box {
        padding: 16px;
    }
    
    .instructions-text {
        font-size: 14px;
    }
    
    .account-details,
    .qr-container {
        padding: 16px;
    }
    
    .file-upload-area {
        padding: 24px 16px;
    }
}

/* Form Description */
.form-description {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 8px;
    line-height: 1.5;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 16px;
}

/* Enhanced Form Group Styling */
.form-group {
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}



/* Sender Bank Dropdown */
#pakpay_sender_bank,
#sender-bank {
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0;
    padding: 12px 16px;
    font-size: 1rem;
    color: #374151;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    font-family: inherit;
    line-height: 1.5;
}

#pakpay_sender_bank:focus,
#sender-bank:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: white;
}

#pakpay_sender_bank:hover,
#sender-bank:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

#pakpay_sender_bank option,
#sender-bank option {
    background-color: white;
    color: #374151;
    padding: 12px 16px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

#pakpay_sender_bank option:hover,
#sender-bank option:hover {
    background-color: #f3f4f6;
}

#pakpay_sender_bank option:checked,
#sender-bank option:checked {
    background-color: #3b82f6;
    color: white;
}

/* Sender bank field - match admin bank style exactly */
#pakpay_sender_bank,
#sender-bank {
    border-radius: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    /* Ensure text displays properly */
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-wrap: break-word;
    word-break: normal;
}

/* Ensure sender bank field has professional appearance */
#pakpay_sender_bank:focus,
#sender-bank:focus {
    border-radius: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    /* Ensure text displays properly */
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-wrap: break-word;
    word-break: normal;
}

/* Ensure consistent styling with other form elements */
.form-select {
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 0;
    padding: 12px 16px;
    font-size: 1rem;
    color: #374151;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    font-family: inherit;
    line-height: 1.5;
    /* Ensure text displays properly */
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-wrap: break-word;
    word-break: normal;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: white;
}

.form-select:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.form-select option {
    background-color: white;
    color: #374151;
    padding: 12px 16px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.form-select option:hover {
    background-color: #f3f4f6;
}

.form-select option:checked {
    background-color: #3b82f6;
    color: white;
}
