/* Easy CTA Buttons - Frontend Stilleri */

/* Mobil Üst Telefon Butonu */
.mobile-phone-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: none;
    justify-content: center;
    padding: 10px;
}

.mobile-phone-top .cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--phone-color);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    min-width: 140px;
    width: 80%;
    max-width: 400px;
}

.mobile-phone-top .cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.mobile-phone-top svg {
    flex-shrink: 0;
}

/* Mobil CTA Stilleri */
.mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
}

.mobile-cta .cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-cta .cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.mobile-cta .phone { 
    background: var(--phone-color); 
}

.mobile-cta .whatsapp { 
    background: var(--whatsapp-color); 
}

.mobile-cta .email { 
    background: var(--email-color); 
}

.mobile-cta svg { 
    flex-shrink: 0; 
}

/* Web CTA Stilleri */
.web-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.web-cta-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.web-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.web-cta-btn:hover::before {
    opacity: 1;
}

.web-cta-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.web-cta-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.web-cta-btn svg {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.web-cta-btn.phone { 
    background: var(--phone-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.web-cta-btn.phone:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.web-cta-btn.whatsapp { 
    background: var(--whatsapp-color);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.web-cta-btn.whatsapp:hover {
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
}

/* Pulse animasyonu */
@keyframes pulse {
    0% { 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
    }
    50% { 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 10px rgba(0,0,0,0.1); 
    }
    100% { 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
    }
}

.web-cta-btn.phone {
    animation: pulse 3s infinite;
}

.web-cta-btn.whatsapp {
    animation: pulse 3s infinite 1.5s;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    /* Mobil cihazlarda web butonları gizle */
    .web-cta {
        display: none !important;
    }
    
    /* Mobil üst telefon butonunu göster */
    .mobile-phone-top {
        display: flex !important;
    }
    
    /* Mobil butonları göster */
    .mobile-cta {
        display: flex !important;
    }
    
    /* Body'ye üst padding ekle (telefon butonu için) */
    body {
        padding-top: 80px;
    }
    
    .absolute-footer {
        padding-bottom: 80px;
    }
}

@media (min-width: 992px) {
    /* Web cihazlarda mobil butonları gizle */
    .mobile-cta {
        display: none !important;
    }
    
    .mobile-phone-top {
        display: none !important;
    }
    
    /* Web butonları göster */
    .web-cta {
        display: flex !important;
    }
    
    /* Body padding'i sıfırla */
    body {
        padding-top: 0 !important;
    }
}

/* Loading Animation */
.cta-loading {
    opacity: 0.7;
    pointer-events: none;
}

.cta-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WhatsApp Form Modal Styles */
.whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.whatsapp-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    width: 500px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.whatsapp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: var(--whatsapp-color);
    color: white;
}

.whatsapp-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.whatsapp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.whatsapp-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.whatsapp-modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.form-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--whatsapp-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
}

/* Contact Form 7 Styling */
.whatsapp-modal-body .wpcf7-form {
    margin: 0;
}

.whatsapp-modal-body .wpcf7-form p {
    margin-bottom: 20px;
}

.whatsapp-modal-body .wpcf7-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.whatsapp-modal-body .wpcf7-form input[type="text"],
.whatsapp-modal-body .wpcf7-form input[type="email"],
.whatsapp-modal-body .wpcf7-form input[type="tel"],
.whatsapp-modal-body .wpcf7-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.whatsapp-modal-body .wpcf7-form input:focus,
.whatsapp-modal-body .wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--whatsapp-color);
}

.whatsapp-modal-body .wpcf7-form textarea {
    min-height: 100px;
    resize: vertical;
}

.whatsapp-modal-body .wpcf7-submit {
    background: var(--whatsapp-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.whatsapp-modal-body .wpcf7-submit:hover {
    background: #1ea851;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-modal-body .wpcf7-response-output {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.whatsapp-modal-body .wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.whatsapp-modal-body .wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .whatsapp-modal-content {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }
    
    .whatsapp-modal-header {
        padding: 15px 20px;
    }
    
    .whatsapp-modal-body {
        padding: 20px;
    }
    
    .whatsapp-modal-header h3 {
        font-size: 16px;
    }
}

/* Admin Panel Error Styles */
.cta-settings-form input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.cta-settings-form .field-error {
    color: #dc3545;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.cta-settings-form .cta-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
}

.cta-settings-form .cta-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 15px 0;
}