/*
Theme Name: Tuar Sigorta
Theme URI: https://canakkaleyazilim.com
Author: Çanakkale Yazılım
Author URI: https://canakkaleyazilim.com
Description: Tuar Sigorta
Version: 1.0.0
Text Domain: tuar-sigorta
*/

.btn-success:hover {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

.bg-base-color {
    background: #fb820d !important;
}

.overlay-dark-medium {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.z-10 {
    z-index: 10;
    position: relative;
}

.icerik {
    color: #212529 !important;
    background: #fff !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin-bottom: 32px !important;
}
.icerik h1,
.icerik h2,
.icerik h3,
.icerik h4,
.icerik h5,
.icerik h6 {
    font-family: inherit !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
}
.icerik h1 { font-size: 2.2rem !important; }
.icerik h2 { font-size: 1.8rem !important; }
.icerik h3 { font-size: 1.5rem !important; }
.icerik h4 { font-size: 1.2rem !important; }
.icerik h5 { font-size: 1.05rem !important; }
.icerik h6 { font-size: 0.95rem !important; }

.icerik p {
    margin-bottom: 16px !important;
}
.icerik ul {
    padding-left: 24px !important;
    margin-bottom: 16px !important;
    list-style-type: disc !important;
}
.icerik ol {
    padding-left: 24px !important;
    margin-bottom: 16px !important;
    list-style-type: decimal !important;
}
.icerik ul li {
    margin-bottom: 6px !important;
    list-style-type: disc !important;
}
.icerik ol li {
    margin-bottom: 6px !important;
    list-style-type: decimal !important;
}
.icerik a {
    color: #fb820d !important;
    text-decoration: underline !important;
    transition: color 0.2s !important;
}
.icerik a:hover {
    color: #e6730a !important;
    text-decoration: underline !important;
}
.icerik img {
    max-width: 100% !important;
    border-radius: 8px !important;
    margin: 18px 0 !important;
    display: block !important;
    height: auto !important;
}
.icerik blockquote {
    border-left: 4px solid #fb820d !important;
    background: #f8fafc !important;
    margin: 18px 0 !important;
    padding: 18px 24px !important;
    border-radius: 6px !important;
    font-style: italic !important;
    color: #475569 !important;
}
.icerik table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 24px !important;
    font-size: 15px !important;
}
.icerik table th,
.icerik table td {
    border: 1px solid #e5e7eb !important;
    padding: 10px 16px !important;
}
.icerik table th {
    background: #f3f4f6 !important;
    font-weight: 600 !important;
}
.icerik figure {
    margin: 24px 0 !important;
    text-align: center !important;
}
.icerik figcaption {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin-top: 8px !important;
}
.icerik strong, .icerik b {
    font-weight: 700 !important;
}
.icerik em, .icerik i {
    font-style: italic !important;
}

/* Chat Asistanı Widget Stilleri */
.tuar-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Butonu */
.tuar-chat-button {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    will-change: transform, opacity;
}

.tuar-chat-button:hover {
    transform: scale(1.05);
}

.tuar-chat-avatar {
    width: 100px;
    height: 100px;
    pointer-events: none;
    user-select: none;
}


/* Konuşma Balonu */
.tuar-chat-bubble {
    position: absolute;
    top: 50%;
    right: 70%;
    width: 190px;
    transform: translateY(-50%) translateX(-10px);
    margin-right: 15px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 250px;
    opacity: 0;
    animation: bubbleFadeIn 0.5s ease forwards;
    animation-delay: 1s;
}

.tuar-chat-bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #fff;
}

.tuar-chat-bubble p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(-10px);
    }
}

/* Chat Penceresi */
.tuar-chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    z-index: 10001;
    pointer-events: auto;
}

.tuar-chat-window.active {
    display: flex;
}

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

/* Chat Header */
.tuar-chat-header {
    background: linear-gradient(135deg, #fb820d 0%, #e6730a 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.tuar-chat-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.tuar-chat-header-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
}

.tuar-chat-status {
    font-size: 12px;
    opacity: 0.9;
}

.tuar-chat-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: opacity 0.2s;
}

.tuar-chat-close:hover {
    opacity: 0.7;
}

/* Chat Mesajları */
.tuar-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tuar-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.tuar-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.tuar-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.tuar-message {
    display: flex;
    gap: 10px;
    animation: messageSlideIn 0.3s ease;
}

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

.tuar-message-user {
    flex-direction: row-reverse;
}

.tuar-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.tuar-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tuar-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.tuar-message-bot .tuar-message-content {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
}

.tuar-message-user .tuar-message-content {
    background: #fb820d;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.tuar-message-content p {
    margin: 0;
}

.tuar-message-content a {
    color: inherit;
    text-decoration: underline;
    word-break: break-all;
}

.tuar-message-bot .tuar-message-content a {
    color: #fb820d;
    text-decoration: underline;
}

.tuar-message-bot .tuar-message-content a:hover {
    color: #e6730a;
    text-decoration: underline;
}

.tuar-message-user .tuar-message-content a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}

.tuar-message-user .tuar-message-content a:hover {
    color: #fff;
    text-decoration: underline;
}


.tuar-iletisim-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #fb820d;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}

.tuar-iletisim-btn:hover {
    background: #e6730a;
    color: #fff !important;
}

.tuar-message-loading {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.tuar-message-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: loadingDot 1.4s infinite;
}

.tuar-message-loading span:nth-child(2) {
    animation-delay: 0.2s;
}

.tuar-message-loading span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.tuar-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.tuar-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.tuar-chat-input:focus {
    border-color: #fb820d;
}

.tuar-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fb820d;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.tuar-chat-send:hover {
    background: #e6730a;
}

.tuar-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .tuar-chat-window {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 90px;
        height: calc(100vh - 100px);
    }
    
    .tuar-chat-bubble {
        max-width: 200px;
        font-size: 12px;
    }
    
    .tuar-chat-avatar {
        width: 100px;
        height: 100px;
    }
}