/* 
==========================================================
    CALLBACK WIDGET STYLES 
========================================================== 
*/

/* Floating Bubble */
.tv1-callback-widget {
    position: fixed;
    bottom: 60px;
    /* Moved down since back-to-top is removed */
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

.tv1-callback-form-wrap {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 420px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.tv1-callback-header {
    border-radius: 24px 24px 0 0;
}

.tv1-callback-widget.is-active .tv1-callback-form-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.tv1-callback-header {
    background: #2563eb;
    color: #fff;
    padding: 24px 30px;
    text-align: left;
}

.tv1-cb-label-small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.tv1-callback-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.tv1-callback-body {
    padding: 24px 30px 30px;
}

.tv1-callback-body form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tv1-cb-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.tv1-cb-field-group label {
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
}

.tv1-cb-row {
    display: flex;
    gap: 15px;
}

.tv1-callback-body input,
.tv1-select-trigger {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13.5px;
    color: #1f2937;
    background: #fff;
    font-family: inherit;
    transition: all 0.2s ease;
    cursor: text;
}

/* Custom Select Dropdown Styling */
.tv1-select-trigger {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv1-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.tv1-select-trigger svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    transition: transform 0.3s ease;
}

.tv1-select-wrap.is-open .tv1-select-trigger svg {
    transform: rotate(180deg);
}

.tv1-callback-body input::placeholder {
    color: #9ca3af;
}

.tv1-callback-body input:focus,
.tv1-select-wrap.is-open .tv1-select-trigger {
    outline: none;
    border-color: #2563eb;
    background: #f8fbff;
}

.tv1-select-wrap {
    position: relative;
    width: 100%;
}

.tv1-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    padding: 6px;
    border: 1.5px solid #f3f4f6;
}

.tv1-select-wrap.is-open .tv1-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tv1-select-option {
    padding: 8px 12px;
    font-size: 13.5px;
    color: #1f2937;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.tv1-select-option:hover,
.tv1-select-option.selected {
    background: #f8fbff;
    color: #2563eb;
    font-weight: 500;
}

.tv1-callback-submit {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 5px;
    width: 100%;
}

.tv1-callback-submit:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.tv1-cb-disclaimer {
    font-size: 11px;
    color: #6b7280;
    margin-top: 10px;
    line-height: 1.5;
    font-style: italic;
    text-align: left;
}

/* Toggle Bubble color - Reverted to Blue */
.tv1-callback-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.tv1-callback-toggle:hover {
    transform: scale(1.05);
    background: #1d4ed8;
}

.tv1-icon-chat,
.tv1-icon-close {
    position: absolute;
    transition: all 0.3s ease;
}

.tv1-icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.tv1-callback-widget.is-active .tv1-icon-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.tv1-callback-widget.is-active .tv1-icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.tv1-callback-toggle::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .tv1-callback-widget {
        bottom: 20px;
        right: 20px;
    }

    .tv1-callback-form-wrap {
        width: 320px;
        right: -10px;
    }
    
    .tv1-callback-header h3 {
        font-size: 15px;
    }
    
    .tv1-cb-row {
        flex-direction: column;
        gap: 12px;
    }
}