.amana-crypto-form {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(80, 217, 180, 0.2), 0 5px 15px rgba(80, 217, 180, 0.1);
}

.amana-crypto-form h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
}

.amana-crypto-form .form-group {
    margin-bottom: 25px;
    /* display: flex;
    flex-direction: column; */
}

.amana-crypto-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    /* flex-shrink: 0; */
}

.amana-crypto-form input,
.amana-crypto-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.amana-crypto-form input:focus,
.amana-crypto-form select:focus {
    outline: none;
    border-color: #50d9b4;
    box-shadow: 0 0 0 3px rgba(80, 217, 180, 0.2);
}

.amana-crypto-form input:read-only {
    background-color: #f8f9fa;
    color: #6c757d;
}

.amana-crypto-form select option:disabled {
    color: #ccc;
    background-color: #f5f5f5;
    font-style: italic;
}

.amana-crypto-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #50d9b4, #3db89a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(80, 217, 180, 0.3);
}

.amana-crypto-form button:hover {
    background: linear-gradient(135deg, #3db89a, #50d9b4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(80, 217, 180, 0.4);
}

.amana-crypto-form button:disabled {
    background: #95a5a6;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.exchange-rate {
    margin-top: 8px;
    font-size: 14px;
    color: #27ae60;
    font-weight: 500;
    /* min-height: 20px;
    flex-shrink: 0; */
}

.exchange-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.exchange-message .success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 8px;
}

.exchange-message .error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
}

.bid-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.bid-link:hover {
    background: #3498db;
    transform: translateY(-2px);
}

/* Select2 customization */
.select2-container--default .select2-selection--single {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    height: 46px;
    padding: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
}

.currency-flag {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #50d9b4;
    color: white;
}

/* Currency logo styles */
.currency-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-option .currency-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.currency-selection {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-selection .currency-logo-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.select2-container--default .select2-selection__rendered .currency-selection {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select2-container--default .select2-results__option .currency-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f8f9fa;
}

/* Two Column Layout */
.form-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

.form-column {
    display: flex;
    flex-direction: column;
}

.form-column .form-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

/* Ensure corresponding form groups align vertically */
.form-column-from .form-group:nth-child(1),
.form-column-to .form-group:nth-child(1) {
    /* Currency select fields */
}

.form-column-from .form-group:nth-child(2),
.form-column-to .form-group:nth-child(2) {
    /* Amount fields - ensure exchange-rate div doesn't break alignment */
}

.form-column-from .form-group:nth-child(3),
.form-column-to .form-group:nth-child(3) {
    /* Account fields */
}

/* Country Selection Styling */
.amana-crypto-form .country-group,
.amana-crypto-form .form-group.country-group {
    margin-bottom: 0 !important;
}

.country-select-wrapper {
    position: relative;
}

.country-exchange-rate {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(80, 217, 180, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    border: 1px solid rgba(80, 217, 180, 0.3);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    transition: all 0.3s ease;
}

.country-exchange-rate.loading {
    opacity: 0.7;
}

.country-exchange-rate .rate-label {
    font-weight: 600;
    color: #50d9b4;
    margin-right: 8px;
}

.country-exchange-rate .rate-value {
    font-weight: 500;
    color: #2c3e50;
}

.country-exchange-rate .rate-separator {
    color: rgba(80, 217, 180, 0.5);
    margin: 0 8px;
    font-weight: 300;
}

/* Loader Styling */
.country-exchange-rate .rate-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #50d9b4;
    font-weight: 500;
}

.country-exchange-rate .loader-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(80, 217, 180, 0.3);
    border-top-color: #50d9b4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Exchange Timer Styling */
.exchange-timer {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(80, 217, 180, 0.05);
    border-radius: 6px;
    font-size: 12px;
    color: #2c3e50;
    border: 1px solid rgba(80, 217, 180, 0.2);
    display: inline-block;
}

.country-exchange-rate .timer-label,
.exchange-timer .timer-label {
    font-weight: 500;
    color: #50d9b4;
    margin-right: 6px;
}

.country-exchange-rate .timer-value,
.exchange-timer .timer-value {
    font-weight: 600;
    color: #50d9b4;
    font-size: 13px;
}

/* Select2 Country Styling */
.country-select + .select2-container {
    width: 100% !important;
}

.country-select + .select2-container .select2-selection--single {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    height: 46px;
    padding: 8px;
    transition: all 0.3s ease;
}

.country-select + .select2-container .select2-selection--single:focus,
.country-select + .select2-container.select2-container--focus .select2-selection--single {
    border-color: #50d9b4;
    box-shadow: 0 0 0 3px rgba(80, 217, 180, 0.2);
}

.country-select + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 30px;
    padding-left: 12px;
}

/* Form Input Styling with Shadows */
.amana-crypto-form input,
.amana-crypto-form select {
    box-shadow: 0 2px 8px rgba(80, 217, 180, 0.1);
}

.amana-crypto-form input:hover,
.amana-crypto-form select:hover {
    box-shadow: 0 4px 12px rgba(80, 217, 180, 0.15);
}

/* Column Styling */
.form-column-from,
.form-column-to {
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(80, 217, 180, 0.1);
    transition: all 0.3s ease;
}

.form-column-from:hover,
.form-column-to:hover {
    box-shadow: 0 5px 15px rgba(80, 217, 180, 0.15);
}

/* Swap Button Styling */
.swap-button-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.swap-currencies-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #50d9b4, #3db89a);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(80, 217, 180, 0.3);
    padding: 0;
    position: relative;
    z-index: 10;
}

.swap-currencies-btn:hover {
    background: linear-gradient(135deg, #3db89a, #50d9b4);
    transform: translateY(-2px) rotate(180deg);
    box-shadow: 0 6px 20px rgba(80, 217, 180, 0.4);
}

.swap-currencies-btn:active {
    transform: translateY(0) rotate(180deg);
    box-shadow: 0 2px 10px rgba(80, 217, 180, 0.3);
}

.swap-currencies-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .swap-button-wrapper {
        order: 2;
        padding: 10px 0;
    }
    
    .form-column-from {
        order: 1;
    }
    
    .form-column-to {
        order: 3;
    }
    
    .amana-crypto-form {
        padding: 25px 20px;
    }
}

/* Error styling for amount exceeds available */
.amana-crypto-form .error-message {
    color: #dc3545;
    font-weight: 500;
}

.amana-crypto-form .error-input {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.amana-crypto-form .field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

#exchange-rate.error-message {
    color: #dc3545;
    font-weight: 500;
}