/**
 * Paybis Crypto Widget - Modern Design
 * Design identic cu imaginea furnizată
 */

.paybis-crypto-widget {
    max-width: 460px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.paybis-widget-header {
    background: linear-gradient(135deg, #6B46C1 0%, #805AD5 100%);
    padding: 28px 24px;
    text-align: center;
    color: #ffffff;
}

.paybis-widget-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* Steps Indicator */
.paybis-steps-indicator {
    display: flex;
    justify-content: space-between;
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.paybis-steps-indicator .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f7fafc;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.step-label {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
    transition: color 0.3s ease;
}

.paybis-steps-indicator .step.active .step-number {
    background: linear-gradient(135deg, #6B46C1 0%, #805AD5 100%);
    color: #ffffff;
    border-color: #6B46C1;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.3);
}

.paybis-steps-indicator .step.active .step-label {
    color: #6B46C1;
    font-weight: 600;
}

.paybis-steps-indicator .step.completed .step-number {
    background: #48bb78;
    color: #ffffff;
    border-color: #48bb78;
}

.paybis-steps-indicator .step.completed .step-number::before {
    content: '✓';
    font-size: 20px;
    font-weight: 700;
}

/* Content */
.paybis-widget-content {
    padding: 32px 24px;
}

.paybis-step {
    display: none;
}

.paybis-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 16px 0;
}

.step-description {
    font-size: 14px;
    color: #718096;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Currency Input Group */
.currency-input-group {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.currency-input-group:focus-within {
    border-color: #6B46C1;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.currency-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 18px 20px;
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    outline: none;
    min-width: 0;
}

.currency-input::placeholder {
    color: #cbd5e0;
    font-weight: 400;
}

.currency-input:read-only {
    cursor: default;
    color: #718096;
}

.currency-select {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    color: #000000;
    border: none;
    border-left: 2px solid #e2e8f0;
    padding: 18px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    min-width: 85px;
    max-width: 85px;
    text-align: center;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    flex-shrink: 0;
}

.currency-select:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFF4CC 100%);
}

.currency-select option {
    background: #ffffff;
    color: #000000;
    padding: 8px;
}

/* Quick Amount Buttons */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.quick-btn {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 15px;
    font-weight: 700;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.quick-btn:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFF4CC 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.quick-btn.active {
    background: linear-gradient(135deg, #6B46C1 0%, #805AD5 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
}

.quick-btn:active {
    transform: translateY(0);
}

/* Promo Code */
.promo-code-section {
    text-align: center;
    margin-bottom: 20px;
}

.promo-code-btn {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 100%);
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    color: #000000;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.promo-code-btn:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FFF4CC 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(212, 175, 55, 0.4);
}

/* Estimate Info */
.estimate-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #fffaf0;
    border: 1px solid #fbd38d;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #744210;
}

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.info-text {
    flex: 1;
    line-height: 1.4;
}

.countdown {
    font-weight: 700;
    color: #c05621;
    font-family: 'Courier New', monospace;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #6B46C1;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
}

.input-hint {
    font-size: 12px;
    color: #718096;
    margin: 6px 0 0 0;
}

.verification-input {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

/* Verification Group */
.verification-group,
.wallet-input-group {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e2e8f0;
}

/* Payment Methods */
.payment-methods-list {
    margin-bottom: 24px;
}

.payment-method-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method-item:hover {
    border-color: #6B46C1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.1);
}

.payment-method-item.selected {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #6B46C1;
}

.method-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 10px;
}

.method-details {
    flex: 1;
}

.method-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

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

.method-check {
    font-size: 20px;
    color: #48bb78;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method-item.selected .method-check {
    opacity: 1;
}

.method-description {
    font-size: 13px;
    color: #718096;
    margin-bottom: 6px;
}

.method-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.method-fee,
.method-time {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.method-fee {
    background: #fef5e7;
    color: #b7791f;
}

.method-time {
    background: #e8f5e9;
    color: #2e7d32;
}

.loading-methods,
.no-methods,
.error-methods {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 14px;
}

.loading-methods .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #6B46C1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.no-methods {
    color: #e53e3e;
    font-weight: 600;
}

.error-methods {
    color: #dd6b20;
    font-weight: 600;
}

/* Transaction Summary */
.transaction-summary {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 2px solid #e2e8f0;
}

.summary-label {
    font-size: 14px;
    color: #718096;
}

.summary-value {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

/* Payment Info Box */
.payment-info-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    border: 2px solid #6B46C1;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

/* Buttons */
.paybis-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: none;
}

.paybis-btn-primary {
    background: linear-gradient(135deg, #6B46C1 0%, #805AD5 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(107, 70, 193, 0.4);
    border: none;
}

.paybis-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.5);
}

.paybis-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(107, 70, 193, 0.3);
}

.paybis-btn-secondary {
    background: #ffffff;
    color: #6B46C1;
    border: 2px solid #6B46C1;
}

.paybis-btn-secondary:hover:not(:disabled) {
    background: #f5f3ff;
    transform: translateY(-1px);
}

.paybis-btn-ghost {
    background: transparent;
    color: #718096;
    border: 2px solid #e2e8f0;
}

.paybis-btn-ghost:hover:not(:disabled) {
    border-color: #cbd5e0;
    background: #f7fafc;
    color: #2d3748;
}

.paybis-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-top: 24px;
}

/* Instant Payment */
.instant-payment-section {
    margin-top: 24px;
}

.or-divider {
    text-align: center;
    position: relative;
    margin: 24px 0;
}

.or-divider span {
    background: #ffffff;
    padding: 0 16px;
    color: #a0aec0;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.apple-pay-btn {
    width: 100%;
    padding: 14px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apple-pay-btn:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

/* Payment Icons */
.payment-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.payment-icons img {
    height: 24px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.payment-icons img:hover {
    opacity: 1;
}

/* Widget Footer */
.widget-footer {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.footer-link {
    font-size: 14px;
    color: #6B46C1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #805AD5;
    text-decoration: underline;
}

/* Error Message */
.paybis-error {
    background: #fed7d7;
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 20px 24px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #718096;
}

.badge-icon {
    font-size: 16px;
}

/* Loading States */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #6B46C1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

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

.loading-methods,
.no-methods,
.error-methods {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-size: 14px;
}

.loading-methods .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #6B46C1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* Responsive */
@media (max-width: 520px) {
    .paybis-crypto-widget {
        border-radius: 0;
        box-shadow: none;
    }
    
    .paybis-widget-content {
        padding: 24px 16px;
    }
    
    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
}

/* Iframe Container Styles */
#paybis-iframe-container {
    margin-top: 24px;
}

.iframe-loading {
    text-align: center;
    padding: 60px 20px;
}

.iframe-loading .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6B46C1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#paybis-payment-iframe {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
}
