/* Novato AI Frontend Styles */

/* WordPress tema çakışmalarını önle */
.novato-floating-chat *,
.novato-floating-chat *::before,
.novato-floating-chat *::after {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.novato-floating-chat svg {
    display: inline-block !important;
    vertical-align: middle !important;
    fill: currentColor !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
}

.novato-floating-chat button {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    text-transform: none !important;
    -webkit-appearance: button !important;
    overflow: visible !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    cursor: pointer !important;
}

/* Icon font çakışmalarını önle */
.novato-floating-chat button::before,
.novato-floating-chat button::after {
    content: none !important;
    display: none !important;
}

/* Font Awesome ve diğer icon font'ları devre dışı bırak */
.novato-floating-chat [class*="fa-"],
.novato-floating-chat [class*="icon-"],
.novato-floating-chat [class*="dashicons"] {
    font-family: inherit !important;
}

.novato-floating-chat [class*="fa-"]::before,
.novato-floating-chat [class*="icon-"]::before,
.novato-floating-chat [class*="dashicons"]::before {
    content: none !important;
    display: none !important;
}

.novato-floating-chat input {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.novato-floating-chat {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-weight: 500 !important;
}

/* Tablet boyutları için */
@media (max-width: 768px) and (min-width: 481px) {
    .novato-floating-chat {
        bottom: 90px !important; /* Tablet için daha geniş alan */
    }
}

/* Mobil için bottom bar çakışmasını önle */
@media (max-width: 768px) {
    .novato-floating-chat {
        bottom: 80px !important; /* Bottom menu için optimal pozisyon */
    }
}

/* Küçük telefon ekranları için */
@media (max-width: 480px) {
    .novato-floating-chat {
        bottom: 70px !important; /* Küçük ekran optimizasyonu */
    }
}

/* Çok küçük ekranlar için */
@media (max-width: 360px) {
    .novato-floating-chat {
        bottom: 60px !important; /* Minimum bottom bar clearance */
    }
}

/* iOS Safari safe area desteği */
@supports (bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .novato-floating-chat {
            bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        }
    }
    
    @media (max-width: 480px) {
        .novato-floating-chat {
            bottom: calc(70px + env(safe-area-inset-bottom)) !important;
        }
    }
    
    @media (max-width: 360px) {
        .novato-floating-chat {
            bottom: calc(60px + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* Chat Toggle Button */
.novato-chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    outline: none;
}

.novato-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.3);
}

.novato-chat-toggle:active {
    transform: scale(0.95);
}

.novato-chat-toggle-icon {
    color: white;
    transition: transform 0.3s ease;
}

.novato-chat-toggle-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Chat Container */
.novato-chat-container {
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transform-origin: bottom right;
}

.novato-chat-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.novato-chat-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.novato-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.novato-chat-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.novato-chat-logo img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.novato-chat-title {
    display: flex;
    flex-direction: column;
}

.novato-chat-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.novato-chat-status {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 1px;
}

.novato-chat-whatsapp,
.novato-chat-fullscreen,
.novato-chat-minimize {
    background: none !important;
    border: none !important;
    color: white !important;
    cursor: pointer;
    padding: 8px !important;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 4px;
    width: 36px !important;
    height: 36px !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

/* SVG ikonlar için güçlü kurallar */
.novato-chat-whatsapp svg,
.novato-chat-fullscreen svg,
.novato-chat-minimize svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    display: block !important;
    pointer-events: none !important;
    color: inherit !important;
    stroke: none !important;
    stroke-width: 0 !important;
}

/* Chat toggle icon */
.novato-chat-toggle svg {
    width: 24px !important;
    height: 24px !important;
    fill: currentColor !important;
    color: white !important;
    display: block !important;
    pointer-events: none !important;
}

/* Send button icon */
.novato-chat-send svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    color: white !important;
    display: block !important;
    pointer-events: none !important;
}

/* Chat mesajlarındaki linkler */
.novato-chat-text a,
.novato-floating-chat a {
    color: #2563eb !important;
    text-decoration: underline !important;
    font-weight: 700 !important; /* Kalın yazı */
    word-break: break-all !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.novato-chat-text a:hover,
.novato-floating-chat a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

.novato-chat-text a:visited,
.novato-floating-chat a:visited {
    color: #7c3aed !important;
    font-weight: 700 !important; /* Visited linkler de kalın */
}

/* WordPress tema override'larını engelle */
.wp-admin .novato-floating-chat,
.wp-admin .novato-floating-chat *,
body .novato-floating-chat,
body .novato-floating-chat * {
    box-sizing: border-box !important;
}

.wp-admin .novato-floating-chat svg,
body .novato-floating-chat svg {
    display: inline-block !important;
    fill: currentColor !important;
    color: inherit !important;
}

.wp-admin .novato-floating-chat button,
body .novato-floating-chat button {
    border: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
}

/* Input field için ekstra güçlü override */
.wp-admin .novato-floating-chat input,
body .novato-floating-chat input,
.novato-floating-chat input[type="text"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.novato-chat-whatsapp:hover,
.novato-chat-fullscreen:hover,
.novato-chat-minimize:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* WhatsApp butonu için özel renk */
.novato-chat-whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
}

.novato-chat-header-right {
    display: flex;
    align-items: center;
}

/* Tam ekran modları */
.novato-floating-chat.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden; /* İçerik taşmasını engelle */
}

/* Desktop için daha nazik tam ekran */
@media (min-width: 769px) {
    .novato-floating-chat.fullscreen {
        background: rgba(0, 0, 0, 0.02);
    }
    
    .novato-floating-chat.fullscreen .novato-chat-container {
        top: 40px !important;
        left: 40px !important;
        right: 40px !important;
        bottom: 40px !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
}

/* Mobilde body scroll engellemesi için ek güvenlik */
@media (max-width: 768px) {
    body:has(.novato-floating-chat.fullscreen) {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
}

.novato-floating-chat.fullscreen .novato-chat-toggle {
    display: none !important;
}

/* Chat açıkken toggle'ı gizle (desktop için) */
.novato-floating-chat.chat-open .novato-chat-toggle {
    display: none !important;
}

.novato-floating-chat.fullscreen .novato-chat-container {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    right: 20px !important;
    bottom: 20px !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.novato-floating-chat.fullscreen .novato-chat-messages {
    max-height: calc(100vh - 180px) !important;
}

.novato-floating-chat.fullscreen .novato-chat-fullscreen svg {
    transform: rotate(45deg);
}

/* Chat Messages */
.novato-chat-messages {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    background: #f8fafc;
    scroll-behavior: smooth;
    outline: none !important; /* Focus stilleri için */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
    touch-action: pan-y; /* Sadece dikey scroll'a izin ver */
}

.novato-chat-messages::-webkit-scrollbar {
    width: 6px;
    pointer-events: none !important; /* Scrollbar ile etkileşimi engelle */
}

.novato-chat-messages::-webkit-scrollbar-track {
    background: transparent;
    pointer-events: none !important;
}

.novato-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    pointer-events: none !important;
}

.novato-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.novato-chat-message {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    animation: fadeInUp 0.3s ease;
}

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

.novato-chat-bot {
    align-items: flex-start;
}

.novato-chat-user {
    align-items: flex-end;
    flex-direction: row-reverse;
}

.novato-chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
}

.novato-chat-user .novato-chat-avatar {
    background: #64748b;
}

.novato-chat-avatar svg {
    width: 18px;
    height: 18px;
}

.novato-chat-content {
    max-width: 70%;
}

.novato-chat-text {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    word-wrap: break-word;
    border: 1px solid #e2e8f0;
}

/* List formatting in chat messages */
.novato-chat-text ul,
.novato-chat-text ol {
    margin: 8px 0;
    padding-left: 20px;
}

.novato-chat-text li {
    margin: 2px 0;
    line-height: 1.4;
}

.novato-chat-text p {
    margin: 4px 0;
}

.novato-chat-text p:first-child {
    margin-top: 0;
}

.novato-chat-text p:last-child {
    margin-bottom: 0;
}

.novato-chat-text h1,
.novato-chat-text h2,
.novato-chat-text h3,
.novato-chat-text h4,
.novato-chat-text h5,
.novato-chat-text h6 {
    margin: 8px 0 4px 0;
    font-weight: 600;
}

.novato-chat-text blockquote {
    margin: 8px 0;
    padding-left: 12px;
    border-left: 3px solid #e2e8f0;
    color: #64748b;
}

.novato-chat-text pre {
    margin: 8px 0;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 8px;
    overflow-x: auto;
}

.novato-chat-text code {
    background: #f1f5f9;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 13px;
}

.novato-chat-user .novato-chat-text {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Typing Indicator */
.novato-chat-typing {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 14px 18px !important;
    background: #f8fafc !important;
    border-radius: 18px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    max-width: 85px !important;
    min-height: 48px !important;
    margin: 0 !important;
}

.novato-chat-typing-dot {
    width: 10px !important;
    height: 10px !important;
    background: #47b8e9 !important;
    border-radius: 50% !important;
    animation: novato-typing 1.4s infinite ease-in-out both !important;
}

.novato-chat-typing-dot:nth-child(1) { animation-delay: -0.32s !important; }
.novato-chat-typing-dot:nth-child(2) { animation-delay: -0.16s !important; }
.novato-chat-typing-dot:nth-child(3) { animation-delay: 0s !important; }

@keyframes novato-typing {
    0%, 80%, 100% { 
        transform: scale(0.6) !important;
        opacity: 0.4 !important;
    }
    40% { 
        transform: scale(1.2) !important;
        opacity: 1 !important;
    }
}

/* Mobil için typing indicator */
@media (max-width: 768px) {
    .novato-chat-typing {
        max-width: 75px !important;
        padding: 12px 16px !important;
        min-height: 42px !important;
        gap: 5px !important;
    }
    
    .novato-chat-typing-dot {
        width: 8px !important;
        height: 8px !important;
    }
}

/* Chat Input */
.novato-chat-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    overflow: hidden; /* Kare taşmayı engelle */
}

.novato-chat-form {
    margin-bottom: 6px;
    border: none !important;
    padding: 0 !important;
    background: none !important;
}

.novato-chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f8fafc;
    border-radius: 24px;
    padding: 4px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    overflow: hidden; /* Kare taşmayı engelle */
}

.novato-chat-input-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08); /* Daha yumuşak shadow */
}

.novato-chat-input {
    flex: 1;
    border: none !important;
    background: none !important;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    outline: none !important;
    color: #1e293b;
    box-shadow: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.novato-chat-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Mobil tarayıcılar için focus optimizasyonu */
@media (max-width: 768px) {
    .novato-chat-input {
        font-size: 16px !important; /* iOS zoom'u engelle */
        -webkit-text-size-adjust: 100% !important;
    }
    
    .novato-chat-input:focus {
        font-size: 16px !important; /* iOS zoom'u engelle */
        transform: none !important;
        -webkit-transform: none !important;
        -webkit-user-select: text !important;
        user-select: text !important;
    }
}

.novato-chat-input::placeholder {
    color: #64748b;
}

.novato-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.novato-chat-send:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.novato-chat-send:active {
    transform: scale(0.95);
}

.novato-chat-send:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.novato-chat-powered {
    text-align: center;
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    margin-top: 8px;
}

.novato-chat-disclaimer {
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.3;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Bottom pozisyonu yukarıda tanımlandı */
    
    .novato-chat-toggle {
        width: 60px;
        height: 60px;
        border-radius: 20px;
    }
    
    .novato-chat-container {
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        right: 20px !important;
        bottom: 100px !important;
        width: auto !important;
        height: auto !important;
        border-radius: 20px;
        max-height: calc(100vh - 120px);
    }
    
    .novato-chat-content {
        max-width: 85%;
    }
    
    .novato-chat-header {
        padding: 16px 20px;
        border-radius: 20px 20px 0 0;
    }
    
    .novato-chat-messages {
        padding: 16px 20px;
        max-height: calc(100vh - 240px);
        overflow-y: auto;
    }
    
    .novato-chat-input-container {
        padding: 16px 20px 20px 20px;
        border-radius: 0 0 20px 20px;
    }
    
    .novato-chat-text {
        padding: 12px 16px;
        font-size: 15px;
        line-height: 1.5;
    }
    
    .novato-chat-input {
        padding: 14px 18px;
        font-size: 16px;
    }
    
    .novato-chat-send {
        width: 40px;
        height: 40px;
    }
    
    .novato-chat-avatar {
        width: 32px;
        height: 32px;
    }
    
    .novato-chat-logo {
        width: 32px;
        height: 32px;
    }
    
    .novato-chat-name {
        font-size: 15px;
    }
    
    .novato-chat-status {
        font-size: 12px;
    }
    
    .novato-chat-message {
        gap: 10px;
        margin-bottom: 16px;
    }
    
    /* Mobilde tam ekran - tüm ekranı kapla */
    .novato-floating-chat.fullscreen {
        background: rgba(0, 0, 0, 0.05) !important;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-container {
        top: 0px !important;
        left: 0px !important;
        right: 0px !important;
        bottom: 0px !important;
        border-radius: 0 !important;
        max-height: 100vh !important;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-header {
        border-radius: 0 !important;
        padding: 20px 20px 16px 20px;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-messages {
        max-height: calc(100vh - 180px) !important;
        padding: 20px;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-input-container {
        border-radius: 0 !important;
        padding: 16px 20px 20px 20px;
    }
}

@media (max-width: 480px) {
    /* Bottom pozisyonu ana stillerde tanımlandı */
    
    .novato-chat-toggle {
        width: 56px;
        height: 56px;
        border-radius: 18px;
    }
    
    .novato-chat-container {
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        right: 15px !important;
        bottom: 85px !important;
        width: auto !important;
        height: auto !important;
        border-radius: 18px;
        max-height: calc(100vh - 100px);
    }
    
    .novato-chat-content {
        max-width: 88%;
    }
    
    .novato-chat-header {
        padding: 14px 18px;
        border-radius: 18px 18px 0 0;
    }
    
    .novato-chat-messages {
        padding: 14px 18px;
        max-height: calc(100vh - 220px);
    }
    
    .novato-chat-input-container {
        padding: 14px 18px 18px 18px;
        border-radius: 0 0 18px 18px;
    }
    
    .novato-chat-text {
        padding: 10px 14px;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .novato-chat-input {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .novato-chat-send {
        width: 36px;
        height: 36px;
    }
    
    .novato-chat-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .novato-chat-logo {
        width: 30px;
        height: 30px;
    }
    
    .novato-chat-name {
        font-size: 14px;
    }
    
    .novato-chat-status {
        font-size: 11px;
    }
    
    .novato-chat-powered {
        font-size: 10px;
        margin-top: 6px;
    }
    
    .novato-chat-disclaimer {
        font-size: 9px;
        margin-top: 3px;
    }
    
    .novato-chat-message {
        gap: 8px;
        margin-bottom: 14px;
    }
    
    /* Tam ekran optimizasyonları */
    .novato-floating-chat.fullscreen .novato-chat-container {
        top: 0px !important;
        left: 0px !important;
        right: 0px !important;
        bottom: 0px !important;
        border-radius: 0 !important;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-header {
        border-radius: 0 !important;
        padding: 18px 18px 14px 18px;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-messages {
        max-height: calc(100vh - 170px) !important;
        padding: 18px;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-input-container {
        border-radius: 0 !important;
        padding: 14px 18px 18px 18px;
    }
}

@media (max-width: 360px) {
    /* Bottom pozisyonu ana stillerde tanımlandı */
    
    .novato-chat-toggle {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }
    
    .novato-chat-container {
        position: fixed !important;
        top: 12px !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 75px !important;
        width: auto !important;
        height: auto !important;
        border-radius: 16px;
        max-height: calc(100vh - 87px);
    }
    
    .novato-chat-content {
        max-width: 90%;
    }
    
    .novato-chat-header {
        padding: 12px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .novato-chat-messages {
        padding: 12px 16px;
        max-height: calc(100vh - 200px);
    }
    
    .novato-chat-input-container {
        padding: 12px 16px 16px 16px;
        border-radius: 0 0 16px 16px;
    }
    
    .novato-chat-text {
        font-size: 13px;
        padding: 8px 12px;
        line-height: 1.4;
    }
    
    .novato-chat-input {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    .novato-chat-send {
        width: 34px;
        height: 34px;
    }
    
    .novato-chat-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .novato-chat-logo {
        width: 28px;
        height: 28px;
    }
    
    .novato-chat-name {
        font-size: 13px;
    }
    
    .novato-chat-status {
        font-size: 10px;
    }
    
    .novato-chat-message {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .novato-chat-powered {
        font-size: 9px;
        margin-top: 5px;
    }
    
    .novato-chat-disclaimer {
        font-size: 8px;
        margin-top: 2px;
    }
    
    /* Tam ekran optimizasyonları */
    .novato-floating-chat.fullscreen .novato-chat-container {
        top: 0px !important;
        left: 0px !important;
        right: 0px !important;
        bottom: 0px !important;
        border-radius: 0 !important;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-header {
        border-radius: 0 !important;
        padding: 16px 16px 12px 16px;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-messages {
        max-height: calc(100vh - 160px) !important;
        padding: 16px;
    }
    
    .novato-floating-chat.fullscreen .novato-chat-input-container {
        border-radius: 0 !important;
        padding: 12px 16px 16px 16px;
    }
}

/* Hide old chatbot */
.novato-ai-container {
    display: none !important;
}

.page-with-novato-ai footer.footer {
    display: none !important;
}

/* Admin sayfaları için özel ayarlar */
.wp-admin .novato-floating-chat {
    z-index: 999999 !important;
    position: fixed !important;
}

.wp-admin .novato-chat-container {
    z-index: 999999 !important;
}

/* Admin sayfalarında footer alanını koru */
.wp-admin #wpfooter {
    position: relative !important;
    z-index: 999998 !important;
}

/* iOS Safari optimizasyonları */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .novato-chat-container {
            bottom: max(100px, env(safe-area-inset-bottom, 20px)) !important;
        }
        
        .novato-chat-input {
            font-size: 16px !important; /* iOS zoom önleme */
        }
    }
}

/* Touch optimizasyonları */
@media (pointer: coarse) {
    .novato-chat-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .novato-chat-send {
        min-width: 44px;
        min-height: 44px;
    }
    
    .novato-chat-whatsapp,
    .novato-chat-fullscreen,
    .novato-chat-minimize {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
} 