/* Sigo AI Danışman Widget - Sigortam Hemen */

.sigo-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    font-family: 'Hind', Arial, sans-serif;
}

.sigo-widget__launcher {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    border: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, #2E3192 0%, #EC008C 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(46, 49, 146, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.sigo-widget__launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(4, 33, 129, 0.55);
}

.sigo-widget__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    animation: sigo-pulse 2.5s ease-in-out infinite;
}

.sigo-widget__avatar img,
.sigo-widget__avatar svg,
.sigo-widget__header-avatar img,
.sigo-widget__header-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sigo-widget__emoji {
    font-size: 26px;
    line-height: 1;
}

.sigo-widget__header-avatar .sigo-widget__emoji {
    font-size: 22px;
}

@keyframes sigo-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

.sigo-widget__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 16px);
    width: 420px;
    max-width: calc(100vw - 32px);
    height: 640px;
    max-height: calc(100vh - 140px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e8ecf4;
    box-shadow: 0 24px 80px rgba(4, 33, 129, 0.25);
}

.sigo-widget--open .sigo-widget__panel {
    display: flex;
}

.sigo-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2E3192 0%, #EC008C 100%);
    color: #fff;
}

.sigo-widget__header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sigo-widget__header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sigo-widget__header-avatar img,
.sigo-widget__header-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sigo-widget__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.sigo-widget__subtitle {
    margin: 0;
    font-size: 12px;
    opacity: 0.85;
}

.sigo-widget__header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sigo-widget__btn-icon {
    border: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sigo-widget__btn-icon:hover {
    background: rgba(255,255,255,0.25);
}

.sigo-widget__history {
    display: none;
    padding: 8px 12px;
    background: #f4f6fb;
    border-bottom: 1px solid #e8ecf4;
    max-height: 120px;
    overflow-y: auto;
}

.sigo-widget__history--visible {
    display: block;
}

.sigo-widget__history-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    margin-bottom: 4px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    color: #2E3192;
}

.sigo-widget__history-item:hover {
    background: #e8ecf4;
}

.sigo-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9fafc;
    scrollbar-width: thin;
    scrollbar-color: #EC008C #e8ecf4;
}
.sigo-widget__messages::-webkit-scrollbar { width: 8px; }
.sigo-widget__messages::-webkit-scrollbar-track { background: #e8ecf4; border-radius: 8px; }
.sigo-widget__messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2E3192, #EC008C);
    border-radius: 8px;
}
.sigo-widget__messages::-webkit-scrollbar-thumb:hover { background: #00F2FF; }

.sigo-widget__message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.sigo-widget__message--bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid #e8ecf4;
    border-bottom-left-radius: 4px;
}

.sigo-widget__message--user {
    align-self: flex-end;
    background: #2E3192;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.sigo-widget__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
    background: #f9fafc;
}

.sigo-widget__option {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
    padding: 10px 14px;
    border: 1px solid rgba(236, 0, 140, 0.35);
    border-radius: 999px;
    background: #fff;
    color: #2E3192;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.sigo-widget__option:hover {
    background: linear-gradient(135deg, rgba(46,49,146,.08), rgba(236,0,140,.1));
    border-color: #EC008C;
    transform: translateY(-1px);
}

.sigo-widget__option--full {
    flex: 1 1 100%;
}

.sigo-widget__cta {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    background: #2E3192;
    color: #fff !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.sigo-widget__typing {
    align-self: flex-start;
    display: none;
    gap: 5px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: 14px;
}

.sigo-widget__typing--visible {
    display: inline-flex;
}

.sigo-widget__typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2E3192;
    animation: sigo-bounce 1.2s infinite ease-in-out;
}

.sigo-widget__typing span:nth-child(2) { animation-delay: 0.15s; }
.sigo-widget__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes sigo-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-5px); opacity: 1; }
}

.sigo-widget__composer {
    display: none;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e8ecf4;
    background: #fff;
}

.sigo-widget__composer--visible {
    display: flex;
}

.sigo-widget__input {
    flex: 1;
    min-height: 42px;
    max-height: 100px;
    padding: 10px 14px;
    border: 1px solid #d0d8e8;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    resize: none;
}

.sigo-widget__input:focus {
    outline: 2px solid #2E3192;
    outline-offset: 1px;
}

.sigo-widget__send {
    min-width: 80px;
    border: 0;
    border-radius: 10px;
    background: #2E3192;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sigo-widget__send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .sigo-widget {
        right: 12px;
        bottom: 16px;
        left: auto;
    }

    .sigo-widget__panel {
        width: 100%;
        height: calc(100vh - 120px);
        max-height: none;
        border-radius: 16px 16px 0 0;
    }

    .sigo-widget__launcher {
        width: auto;
        justify-content: center;
    }
}
