/* Klickl Crypto Trader Styles */

.klickl-form-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.klickl-form-container h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.klickl-crypto-form {
    margin-top: 20px;
}

.klickl-form-group {
    margin-bottom: 20px;
}

.klickl-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.klickl-form-group input,
.klickl-form-group select,
.klickl-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.klickl-form-group input:focus,
.klickl-form-group select:focus,
.klickl-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.3);
}

.klickl-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Bank Details Section */
.klickl-bank-details {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.klickl-bank-details h4 {
    margin-top: 0;
    color: #333;
}

/* Payment Details Section */
.klickl-payment-details {
    margin-top: 15px;
    padding: 15px;
    background: #f0f8ff;
    border: 1px solid #b8d4f1;
    border-radius: 4px;
}

.klickl-payment-channel-info h4 {
    margin-top: 0;
    color: #0073aa;
}

.klickl-payment-channel-info p {
    margin: 5px 0;
}

.klickl-payment-channel-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* Buttons */
.klickl-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.klickl-btn-primary {
    background-color: #0073aa;
    color: white;
}

.klickl-btn-primary:hover {
    background-color: #005177;
    color: white;
    text-decoration: none;
}

.klickl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Result Messages */
.klickl-result {
    margin-top: 20px;
}

.klickl-success {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.klickl-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

.klickl-info {
    padding: 15px;
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* QR Code Info */
.klickl-qr-info {
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
}

/* Loading States */
.klickl-loading {
    opacity: 0.7;
    pointer-events: none;
}

.klickl-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .klickl-form-container {
        margin: 10px;
        padding: 15px;
    }

    .klickl-form-group input,
    .klickl-form-group select,
    .klickl-form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .klickl-btn {
        width: 100%;
        margin: 10px 0 5px 0;
    }
}

/* Order Status Indicators */
.order-status {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Currency and Coin Selection Enhancement */
.klickl-form-group select[name="currency"],
.klickl-form-group select[name="coin"] {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcgMTFMMSA1SDE2TDcgMTFaIiBmaWxsPSIjNjY2Ii8+Cjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 35px;
}

/* Form Grid Layout for Better UX */
.klickl-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.klickl-form-row .klickl-form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .klickl-form-row {
        flex-direction: column;
        gap: 0;
    }

    .klickl-form-row .klickl-form-group {
        margin-bottom: 20px;
    }
}

/* Enhanced Payment Method Display */
.payment-method-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method-option:hover {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.payment-method-option.selected {
    border-color: #0073aa;
    background-color: #e6f3ff;
}

.payment-method-limits {
    font-size: 12px;
    color: #666;
}

/* Transaction Progress Indicator */
.klickl-progress {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 15px 0;
}

.klickl-progress-bar {
    height: 100%;
    background-color: #0073aa;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Enhanced Error Styling */
.klickl-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.3) !important;
}

.klickl-field-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Success Animation */
.klickl-success-animation {
    animation: fadeInSuccess 0.5s ease-in-out;
}

@keyframes fadeInSuccess {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .klickl-btn,
    .klickl-form-container button {
        display: none;
    }

    .klickl-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Exchange Rate Display */
.klickl-rate-display {
    color: #666;
    font-size: 11px;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.klickl-buy-rate-info,
.klickl-sell-rate-info {
    margin-top: 5px;
    padding: 5px 8px;
    background-color: #f8f9fa;
    border-left: 3px solid #0073aa;
    border-radius: 3px;
}

.klickl-conversion-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #0073aa;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.klickl-form-group {
    position: relative;
}

.klickl-form-group.converting .klickl-conversion-indicator {
    opacity: 1;
}

.klickl-exchange-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
}

.klickl-exchange-summary h5 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.klickl-rate-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    padding: 3px 0;
    border-bottom: 1px dotted #dee2e6;
}

.klickl-rate-row:last-child {
    border-bottom: none;
    font-weight: 600;
    color: #0073aa;
}

.klickl-rate-label {
    color: #6c757d;
}

.klickl-rate-value {
    color: #495057;
    font-weight: 500;
}

/* Conversion Animation */
@keyframes convertPulse {
    0% { background-color: transparent; }
    50% { background-color: rgba(0, 115, 170, 0.1); }
    100% { background-color: transparent; }
}

.klickl-form-group.converting input {
    animation: convertPulse 1s ease-in-out;
}

/* Mobile responsiveness for rate display */
@media (max-width: 768px) {
    .klickl-exchange-summary {
        font-size: 12px;
        padding: 10px;
    }

    .klickl-rate-row {
        flex-direction: column;
        gap: 2px;
    }

    .klickl-rate-display {
        font-size: 10px;
    }
}

/* Modal Styles */
.klickl-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.klickl-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.klickl-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.klickl-modal-close:hover,
.klickl-modal-close:focus {
    color: #000;
    text-decoration: none;
}

/* Login Tabs */
.klickl-login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.klickl-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.klickl-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.klickl-tab-btn:hover {
    color: #0073aa;
    background-color: #f8f9fa;
}

.klickl-tab-content {
    display: none;
}

.klickl-tab-content.active {
    display: block;
}

/* Input Groups */
.klickl-input-group {
    display: flex;
    gap: 10px;
}

.klickl-input-group input {
    flex: 1;
}

.klickl-input-group button {
    white-space: nowrap;
}

/* Button Styles */
.klickl-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.klickl-btn:hover {
    background-color: #005a87;
}

.klickl-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.klickl-btn-primary {
    background-color: #0073aa;
}

.klickl-btn-secondary {
    background-color: #666;
}

.klickl-btn-secondary:hover {
    background-color: #555;
}

.klickl-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.klickl-btn-full {
    width: 100%;
}

/* Message Styles */
.klickl-messages {
    margin: 15px 0;
}

.klickl-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 10px;
}

.klickl-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* User Info Display */
.klickl-user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.klickl-login-status {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 20px;
}

.klickl-login-required {
    margin-bottom: 15px;
    color: #6c757d;
}

/* Trading Form Styles */
.klickl-trading-form {
    margin-top: 20px;
}

.klickl-help-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.klickl-rate-display {
    color: #28a745;
    font-weight: bold;
}

/* Bank Details Section */
.klickl-bank-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.klickl-bank-details h4 {
    margin-top: 0;
    color: #495057;
}

/* Payment Details */
.klickl-payment-details {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

/* Results and Status */
.klickl-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.status-pending {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.status-completed {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.status-failed {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .klickl-form-container {
        margin: 10px;
        padding: 15px;
    }

    .klickl-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }

    .klickl-input-group {
        flex-direction: column;
    }

    .klickl-user-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}
