/* ===== Contact Sidebar ===== */
.contact-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 998;
    display: flex;
    align-items: center;
    direction: rtl;
}

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: linear-gradient(135deg, #b586ff, #177fab);
    color: #fff;
    border: none;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 15px rgba(181, 134, 255, 0.4);
}

.sidebar-toggle:hover {
    padding-right: 14px;
    box-shadow: 4px 2px 20px rgba(181, 134, 255, 0.6);
}

.sidebar-toggle svg {
    writing-mode: horizontal-tb;
}

.sidebar-toggle span {
    letter-spacing: 1px;
}

.sidebar-panel {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateX(-110%) translateY(-50%);
    width: 300px;
    background: #fff;
    border-radius: 0 16px 16px 0;
    box-shadow: 4px 4px 30px rgba(0, 0, 0, 0.15);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.contact-sidebar.open .sidebar-panel {
    transform: translateX(0) translateY(-50%);
    opacity: 1;
    visibility: visible;
}

.contact-sidebar.open .sidebar-toggle {
    border-radius: 0;
    background: #383934;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-family: 'Rubik', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #383934;
    margin-bottom: 6px;
}

.sidebar-header p {
    font-family: 'Rubik', sans-serif;
    font-size: 0.85rem;
    color: #636363;
    line-height: 1.5;
}

.sidebar-form-group {
    margin-bottom: 14px;
}

.sidebar-form-group label {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #383934;
    margin-bottom: 6px;
}

.sidebar-form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Rubik', sans-serif;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 1px;
    color: #383934;
    transition: border-color 0.3s ease;
}

.sidebar-form-group input:focus {
    outline: none;
    border-color: #b586ff;
}

.sidebar-form-group input::placeholder {
    color: #bbb;
}

.sidebar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, #b586ff, #177fab);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(181, 134, 255, 0.4);
}

.sidebar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sidebar-status {
    text-align: center;
    padding: 20px 0;
}

.sidebar-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #b586ff;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sidebar-status p,
.sidebar-success p,
.sidebar-error p {
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    color: #383934;
    line-height: 1.6;
}

.sidebar-success {
    text-align: center;
    padding: 16px 0;
}

.sidebar-success svg {
    margin: 0 auto 10px;
    display: block;
}

.sidebar-error {
    text-align: center;
    padding: 16px 0;
}

.sidebar-error p {
    color: #dc2626;
}

.sidebar-info {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eee;
    text-align: center;
}

.sidebar-info p {
    font-family: 'Rubik', sans-serif;
    font-size: 0.8rem;
    color: #636363;
    margin-bottom: 2px;
}

.sidebar-info a {
    font-family: 'Rubik', sans-serif;
    font-size: 0.9rem;
    color: #177fab;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-info a:hover {
    color: #b586ff;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .contact-sidebar {
        top: auto;
        bottom: 80px;
        transform: none;
    }

    .sidebar-toggle {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        flex-direction: row;
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 0 10px 10px 0;
    }

    .sidebar-panel {
        width: calc(100vw - 20px);
        max-width: 320px;
        top: auto;
        bottom: 0;
        transform: translateX(-110%) translateY(0);
        border-radius: 0 16px 0 0;
    }

    .contact-sidebar.open .sidebar-panel {
        transform: translateX(0) translateY(0);
    }
}
