/**
 * Frontend CSS - Fiyat Talep Formu
 */

/* Talep Butonu */
.wcpr-request-button-wrapper {
    margin: 20px 0;
}

.wcpr-request-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #f97316;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.wcpr-request-button:hover {
    transform: translateY(-2px);
    background: #ea580c;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.wcpr-request-button:active {
    transform: translateY(0);
}

.wcpr-request-button svg {
    flex-shrink: 0;
}

/* Modal Overlay */
.wcpr-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}

.wcpr-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.wcpr-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: wcprModalSlideIn 0.3s ease;
    margin: auto;
    overflow: visible;
}

@keyframes wcprModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Kapatma Butonu */
.wcpr-modal-header .wcpr-modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease;
    z-index: 100 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    color: #000000 !important;
    font-family: Arial, sans-serif !important;
}

.wcpr-modal-header .wcpr-modal-close:hover {
    opacity: 0.5;
    transform: none !important;
    background: transparent !important;
}

/* Modal Header */
.wcpr-modal-header {
    position: relative;
    padding: 16px 24px 0;
    text-align: center;
}

.wcpr-modal-header h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.wcpr-modal-product-name {
    margin: 0;
    padding: 0 20px;
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8em;
}

/* Form */
.wcpr-form {
    padding: 16px 24px 24px;
}

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

.wcpr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.wcpr-form-group label .required {
    color: #ef4444;
}

.wcpr-form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.wcpr-form-group input:focus {
    background: #ffffff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wcpr-form-group input::placeholder {
    color: #9ca3af;
}

/* Telefon input - sadece sayı */
.wcpr-form-group input[type="tel"] {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

/* Form Actions */
.wcpr-form-actions {
    margin-top: 24px;
}

.wcpr-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #f97316;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wcpr-submit-button:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #ea580c;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.wcpr-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.wcpr-spinner {
    animation: wcprSpin 1s linear infinite;
}

@keyframes wcprSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.wcpr-success-message {
    padding: 48px 32px;
    text-align: center;
}

.wcpr-success-message svg {
    color: #10b981;
    margin-bottom: 16px;
}

.wcpr-success-message h4 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.wcpr-success-message p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Error State */
.wcpr-form-group.error input {
    border-color: #ef4444;
    background: #fef2f2;
}

.wcpr-form-group .error-message {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #ef4444;
}

/* Mobile Responsive */
@media screen and (max-width: 480px) {
    .wcpr-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .wcpr-modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        animation: wcprModalSlideUp 0.3s ease;
        margin: 0;
    }
    
    @keyframes wcprModalSlideUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .wcpr-modal-header {
        padding: 16px 20px 0;
    }
    
    .wcpr-modal-header h3 {
        font-size: 18px;
    }
    
    .wcpr-modal-product-name {
        font-size: 11px;
        padding: 0 15px;
    }
    
    .wcpr-form {
        padding: 14px 20px 24px;
    }
    
    .wcpr-form-group input {
        font-size: 16px;
        padding: 12px;
    }
    
    .wcpr-modal-header .wcpr-modal-close {
        top: 10px !important;
        right: 10px !important;
        font-size: 24px !important;
    }
}

/* Zoom önleme - iOS için */
@media screen and (max-width: 768px) {
    .wcpr-form-group input {
        font-size: 16px !important;
    }
    
    .wcpr-form-group input:focus {
        font-size: 16px !important;
    }
}

/* Araç Markası Sayfası */
/* Result count gizle */
.tax-vehicle_brand .woocommerce-result-count,
.tax-vehicle_brand p.woocommerce-result-count,
body.tax-vehicle_brand .woocommerce-result-count {
    display: none !important;
    visibility: hidden !important;
}

/* Marka Header - Logo ve İsim */
.wcpr-brand-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    padding: 5px 0;
}

.wcpr-brand-header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.wcpr-brand-header-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Araç Markası Logo (sayfa altı) */
.wcpr-vehicle-brand-logo {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    clear: both;
}

.wcpr-vehicle-brand-logo img {
    max-width: 200px;
    height: auto;
}

/* Marka SEO Metin Alanı */
.wcpr-brand-seo-text {
    margin-top: 40px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    max-height: 400px;
    overflow-y: auto;
}

.wcpr-brand-seo-text h1,
.wcpr-brand-seo-text h2,
.wcpr-brand-seo-text h3,
.wcpr-brand-seo-text h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1f2937;
}

.wcpr-brand-seo-text p {
    margin-bottom: 15px;
}

.wcpr-brand-seo-text ul,
.wcpr-brand-seo-text ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.wcpr-brand-seo-text a {
    color: #f97316;
    text-decoration: underline;
}

.wcpr-brand-seo-text a:hover {
    color: #ea580c;
}

/* Kategori SEO Metin Alanı */
.wcpr-category-seo-text {
    margin-top: 40px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    max-height: 400px;
    overflow-y: auto;
}

.wcpr-category-seo-text h1,
.wcpr-category-seo-text h2,
.wcpr-category-seo-text h3,
.wcpr-category-seo-text h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1f2937;
}

.wcpr-category-seo-text p {
    margin-bottom: 15px;
}

.wcpr-category-seo-text ul,
.wcpr-category-seo-text ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.wcpr-category-seo-text a {
    color: #f97316;
    text-decoration: underline;
}

.wcpr-category-seo-text a:hover {
    color: #ea580c;
}

/* Body scroll lock */
body.wcpr-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Accessibility */
.wcpr-modal:focus {
    outline: none;
}

.wcpr-modal-close:focus,
.wcpr-submit-button:focus,
.wcpr-form-group input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wcpr-modal {
        background: #1f2937;
    }
    
    .wcpr-modal-header h3 {
        color: #f9fafb;
    }
    
    .wcpr-modal-product-name {
        color: #9ca3af;
    }
    
    .wcpr-form-group label {
        color: #e5e7eb;
    }
    
    .wcpr-form-group input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .wcpr-form-group input:focus {
        background: #374151;
        border-color: #667eea;
    }
    
    .wcpr-form-group input::placeholder {
        color: #6b7280;
    }
    
    .wcpr-modal-close {
        background: #374151;
    }
    
    .wcpr-modal-close:hover {
        background: #4b5563;
    }
    
    .wcpr-modal-close svg {
        color: #9ca3af;
    }
    
    .wcpr-success-message h4 {
        color: #f9fafb;
    }
    
    .wcpr-success-message p {
        color: #9ca3af;
    }
}
