#floating-tracking-container {
    position: fixed;
    top: 50%;
    /* متغیر عرض فرم */
    --form-width: 300px;

    /* حالت بسته: انتقال به چپ */
    left: calc(-1 * var(--form-width));

    transform: translateY(-50%);
    z-index: 99999;

    display: flex;
    align-items: stretch;

    /* انیمیشن نرم */
    transition: left 0.5s cubic-bezier(0.19, 1, 0.22, 1);

    font-family: inherit;
    filter: drop-shadow(5px 5px 15px rgba(0, 0, 0, 0.08));
}

#floating-tracking-container.open {
    left: 0;
}

.floating-form-panel {
    width: var(--form-width);
    background-color: #ffffff;
    padding: 30px 25px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 10px rgba(187, 0, 0, 0.25);
}

.floating-form-trigger {
    /* گرادینت قرمز مدرن */
    background: linear-gradient(160deg, #d50000 0%, #bb0000 100%);
    color: #fff;
    padding: 15px 10px;

    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);

    border-radius: 12px 0 0 12px;

    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;

    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.floating-form-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    z-index: 1;
}

.floating-form-trigger:hover {
    /* تیره‌تر شدن قرمز در هاور */
    background: linear-gradient(160deg, #bb0000 0%, #900000 100%);
}

.floating-form-trigger .icon {
    transform: rotate(90deg);
    font-size: 20px;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.floating-form-trigger:hover .icon {
    transform: rotate(90deg) scale(1.15);
}


.floating-form-panel h4 {
    margin: 0 0 25px;
    font-size: 17px;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.floating-form-panel h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #ffeaea; /* قرمز خیلی خیلی روشن */
    border-radius: 10px;
}

.floating-form-panel .form-group {
    margin-bottom: 18px;
    position: relative;
}

.floating-form-panel label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #64748b;
    text-align: right;
}

.floating-form-panel input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: #f8fafc; /* زمینه خاکستری/آبی خیلی محو */
    color: #334155;

    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
    direction: ltr;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.floating-form-panel input[type="text"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.floating-form-panel input[type="text"]:focus {
    outline: none;
    background: #ffffff;
    border-color: #bb0000;
    box-shadow: 0 0 0 4px rgba(187, 0, 0, 0.1); /* هاله قرمز ملایم */
}

.floating-submit-btn {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    background: linear-gradient(135deg, #d50000 0%, #bb0000 100%);
    color: white !important;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(187, 0, 0, 0.25); /* سایه قرمز */
    position: relative;
    overflow: hidden;
}

.floating-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 0, 0, 0.35);
    background: linear-gradient(135deg, #e60000 0%, #c40000 100%);
}

.floating-submit-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    #floating-tracking-container {
        --form-width: 260px;
    }

    .floating-form-trigger {
        padding: 12px 8px;
        font-size: 14px;
    }

    .floating-form-panel {
        padding: 20px 15px;
    }
}
