/* =============================================================================
   layout/navigation.css
   Fixed floating UI elements: the "Return to Dashboard" back button,
   the "Request CRM" floating button, and the help button.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Back button (agency view → sub-account form)
   ----------------------------------------------------------------------------- */

.back-button {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: var(--z-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 238px;
    height: 44px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 62, 197, 0.15);
    transition: var(--transition-base);
}

.back-button i {
    font-size: var(--font-size-sm);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    color: white;
}

.back-button span {
    color: white;
    display: flex;
    align-items: center;
}

.back-button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
    box-shadow: 0 3px 10px rgba(0, 62, 197, 0.25);
    transform: translateY(-1px);
    color: white;
}

.back-button:active {
    transform: translateY(0);
    color: white;
}

/* -----------------------------------------------------------------------------
   Request CRM floating button
   ----------------------------------------------------------------------------- */

.request-btn-crm {
    position: absolute;
    right: 24px;
    display: none !important; /* shown by JS via style.setProperty with !important */
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 238px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 62, 197, 0.15);
    transition: var(--transition-base);
    z-index: 10;
}

.request-btn-crm.integration { top: 24px; }
.request-btn-crm.filter      { top: 68px; }

.request-btn-crm i {
    font-size: var(--font-size-sm);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.request-btn-crm:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 3px 10px rgba(0, 62, 197, 0.25);
    transform: translateY(-1px);
}

.request-btn-crm:active {
    transform: translateY(0);
}

/* -----------------------------------------------------------------------------
   Help / support floating button
   ----------------------------------------------------------------------------- */

.help-button {
    position: fixed;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: var(--transition-base);
    z-index: var(--z-fixed);
}

.help-button:nth-of-type(1) { top: 1.5rem; }
.help-button:nth-of-type(2) { top: 4.5rem; }

.help-button i {
    font-size: var(--font-size-xl);
}

.help-button:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Small badge used inside floating buttons */
.free-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.5px;
    margin-left: auto;
}

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .help-button {
        padding: 0.625rem 1rem;
        right: 1rem;
        top: 1rem;
    }
}

@media (max-width: 480px) {
    .help-button {
        border-radius: 50%;
        padding: 0.625rem;
    }

    .help-button i   { margin: 0; }
    .help-button span { display: none; }
}
