/**
 * Public Styles
 * DC WooCommerce OTP Verification
 * 
 * @package DC_WooCommerce_OTP
 * @author DuruCraft - Burak Güder
 * @since 1.0.0
 */

/* OTP Section Genel Stilleri */
.dc-otp-checkout-section,
.dc-otp-registration-section,
.dc-otp-profile-section {
    margin: 25px 0;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

/* Checkout Section Özel - Profesyonel ve temiz */
.dc-otp-checkout-section {
    border: 2px solid #e0e0e0;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dc-otp-checkout-section::before {
    content: '⚠️ ZORUNLU';
    position: absolute;
    top: -12px;
    right: 20px;
    background: #d32f2f;
    color: white;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* E-posta Bekleniyor Durumu */
.dc-otp-checkout-section.dc-otp-waiting-email {
    opacity: 0.6;
    border-color: #ddd;
}

.dc-otp-checkout-section.dc-otp-waiting-email::before {
    content: '📧 E-POSTA GİRİN';
    background: #757575;
}

/* E-posta Hazır Durumu */
.dc-otp-checkout-section.dc-otp-email-ready {
    border-color: #2e7d32;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

.dc-otp-checkout-section.dc-otp-email-ready::before {
    content: '✓ HAZIR';
    background: #2e7d32;
}

/* Highlight Animasyonu */
.dc-otp-checkout-section.dc-otp-highlight {
    animation: dc-otp-highlight-pulse 1s ease;
}

@keyframes dc-otp-highlight-pulse {
    0%, 100% {
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
        transform: scale(1.02);
    }
}

/* Pulse Animasyonu */
.dc-otp-checkout-section.dc-otp-pulse {
    animation: dc-otp-gentle-pulse 0.5s ease 2;
}

@keyframes dc-otp-gentle-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

/* Hata Vurgusu */
.dc-otp-checkout-section.dc-otp-error-highlight {
    animation: dc-otp-error-shake 0.5s ease, dc-otp-error-glow 2s ease;
    border-color: #ff4444 !important;
}

@keyframes dc-otp-error-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes dc-otp-error-glow {
    0%, 100% {
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
    }
}

.dc-otp-checkout-section h3,
.dc-otp-checkout-section .dc-otp-heading,
.dc-otp-registration-section label:first-child,
.dc-otp-profile-section legend {
    margin: 0 0 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-otp-checkout-section .dc-otp-heading {
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.dc-otp-checkout-section .dc-otp-heading .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.dc-otp-description {
    margin: 0 0 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* E-posta Alanı Altındaki Bilgilendirme */
.dc-otp-email-notice {
    margin-top: -15px !important;
    margin-bottom: 15px !important;
    padding: 10px 12px !important;
    background: #f5f5f5 !important;
    border-left: 3px solid #1976d2 !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    animation: dc-otp-notice-slide-in 0.5s ease !important;
}

.dc-otp-email-notice strong {
    color: #1976d2;
    font-weight: 600;
}

@keyframes dc-otp-notice-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OTP Wrapper */
.dc-otp-wrapper {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Send Section */
.dc-otp-send-section {
    text-align: left;
}

.dc-otp-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #1976d2 !important;
    border: 1px solid #1565c0 !important;
    color: #fff !important;
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.dc-otp-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.dc-otp-button:hover {
    background: #1565c0 !important;
    border-color: #0d47a1 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.dc-otp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.dc-otp-icon {
    font-size: 18px;
}

.dc-otp-status-message,
.dc-otp-verify-message {
    display: block;
    margin-top: 12px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.dc-otp-status-message.success,
.dc-otp-verify-message.success {
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
    color: #2e7d32;
    display: block;
}

.dc-otp-status-message.error,
.dc-otp-verify-message.error {
    background: #ffebee;
    border-left: 3px solid #f44336;
    color: #c62828;
    display: block;
}

/* Verify Section */
.dc-otp-verify-section {
    margin-top: 20px;
}

.dc-otp-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.dc-otp-input {
    flex: 1;
    padding: 10px 12px !important;
    font-size: 16px !important;
    font-family: 'Courier New', monospace !important;
    letter-spacing: 3px;
    text-align: center;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    transition: all 0.2s ease;
    background: #fff !important;
}

.dc-otp-input:focus {
    border-color: #1976d2 !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1) !important;
    outline: none;
}

.dc-otp-button-primary {
    min-width: 120px;
    white-space: nowrap;
}

/* Actions */
.dc-otp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.dc-otp-link-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #1976d2;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    transition: color 0.2s ease;
}

.dc-otp-link-button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.dc-otp-link-button:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.dc-otp-link-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dc-otp-timer {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Success Section */
.dc-otp-success-section {
    padding: 20px;
    text-align: center;
}

.dc-otp-success-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 3px;
    color: #2e7d32;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    animation: dc-otp-success-appear 0.4s ease;
}

.dc-otp-success-message .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    color: #4caf50;
}

@keyframes dc-otp-success-appear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading State */
.dc-otp-loading-overlay {
    position: relative;
}

.dc-otp-loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Profile Section Özel */
.dc-otp-profile-section fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.dc-otp-profile-section legend {
    padding: 0;
    margin-bottom: 15px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .dc-otp-checkout-section,
    .dc-otp-registration-section,
    .dc-otp-profile-section {
        padding: 20px 15px;
    }
    
    .dc-otp-wrapper {
        padding: 15px;
    }
    
    .dc-otp-input-group {
        flex-direction: column;
    }
    
    .dc-otp-button {
        width: 100%;
        justify-content: center;
    }
    
    .dc-otp-button-primary {
        min-width: 100%;
    }
    
    .dc-otp-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .dc-otp-input {
        font-size: 16px !important;
        letter-spacing: 3px;
    }
}

@media screen and (max-width: 480px) {
    .dc-otp-checkout-section h3,
    .dc-otp-registration-section label:first-child {
        font-size: 16px;
    }
    
    .dc-otp-button {
        padding: 10px 18px !important;
        font-size: 14px !important;
    }
    
    .dc-otp-input {
        padding: 10px 12px !important;
        font-size: 16px !important;
    }
}

/* WooCommerce Uyumluluğu */
.woocommerce-checkout .dc-otp-checkout-section,
.woocommerce-account .dc-otp-registration-section,
.woocommerce-account .dc-otp-profile-section {
    clear: both;
}

/* Animasyonlar */
@keyframes dc-otp-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dc-otp-verify-section,
.dc-otp-success-section {
    animation: dc-otp-fade-in 0.3s ease;
}

/* Print Styles */
@media print {
    .dc-otp-checkout-section,
    .dc-otp-registration-section,
    .dc-otp-profile-section {
        display: none;
    }
}

