/* ==========================================================================
   AppLab / zeravilo  - User & Client Area Stylesheet (user.css)
   ========================================================================== */

@import url('manrope.css');
@import url('material-symbols.css');

/* Material Symbols Outlined Icon Standard Rules */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

:root {
    --primary-color: #137fec;
    --primary-hover: #106fcc;
    --primary-light: rgba(19, 127, 236, 0.1);
    --primary-focus-shadow: rgba(19, 127, 236, 0.15);
    --bg-body: #f6f7f8;
    --text-dark: #101922;
    --border-color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   Base & Typography
   -------------------------------------------------------------------------- */
body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   Color Utilities
   -------------------------------------------------------------------------- */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.icon-gradient {
    background: linear-gradient(135deg, #137fec 0%, #7db9f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   Navbar & Brand Lockup
   -------------------------------------------------------------------------- */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

.brand-lockup:hover {
    opacity: 0.92;
}

.brand-lockup .brand-logo {
    transition: transform 0.2s ease;
}

.brand-lockup:hover .brand-logo {
    transform: scale(1.02);
}

.brand-divider {
    display: inline-block;
    width: 2px;
    height: 26px;
    background-color: #cbd5e1;
    margin: 0 0.9rem;
    border-radius: 2px;
    flex-shrink: 0;
}

.brand-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
}

.brand-text .brand-title-main {
    font-weight: 600;
    color: #1e293b;
}

.brand-text .brand-title-accent {
    font-weight: 800;
    color: var(--primary-color, #137fec);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .brand-text .brand-title-accent {
        background: linear-gradient(135deg, #137fec 0%, #0284c7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

@media (max-width: 576px) {
    .brand-divider {
        margin: 0 0.5rem;
        height: 20px;
    }

    .brand-text {
        font-size: 0.95rem;
        gap: 0.25rem;
    }
}

/* --------------------------------------------------------------------------
   Custom Buttons
   -------------------------------------------------------------------------- */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Form Controls & Floating Labels
   -------------------------------------------------------------------------- */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem var(--primary-focus-shadow);
}

/* Placeholder molto più chiaro */
::placeholder {
    color: #cbd5e1 !important;
    opacity: 1;
}

::-webkit-input-placeholder {
    color: #cbd5e1 !important;
}

::-moz-placeholder {
    color: #cbd5e1 !important;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #cbd5e1 !important;
}

.form-control::placeholder {
    color: #cbd5e1 !important;
    opacity: 1;
}

.form-floating>label {
    color: #64748b;
}

.form-label {
    font-weight: 600;
    color: #495057;
}

.required-asterisk {
    color: #dc3545;
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   Input Icon Group
   -------------------------------------------------------------------------- */
.input-icon-group {
    position: relative;
}

.input-icon-group .form-control {
    padding-left: 2.75rem;
}

.input-icon-group .material-symbols-outlined {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 5;
}

/* --------------------------------------------------------------------------
   Cards & Containers
   -------------------------------------------------------------------------- */
.card-custom {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px -5px rgba(19, 127, 236, 0.08);
    background: #ffffff;
}

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background-color: rgba(19, 127, 236, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon-container {
    width: 80px;
    height: 80px;
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge-soft-primary {
    background-color: rgba(19, 127, 236, 0.1);
    color: #137fec;
}

.badge-soft-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.badge-soft-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.badge-soft-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #997404;
}

/* --------------------------------------------------------------------------
   Section Title
   -------------------------------------------------------------------------- */
.section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(19, 127, 236, 0.2);
}

/* --------------------------------------------------------------------------
   User Profile Dropdown
   -------------------------------------------------------------------------- */
.user-dropdown {
    position: relative;
    cursor: pointer;
    padding: 0.25rem 0;
}

.user-dropdown .dropdown-menu {
    display: none;
    right: 0;
    left: auto;
    min-width: 230px;
    top: 100%;
    margin-top: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.85rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    z-index: 1050;
}

.user-dropdown .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.user-dropdown:hover .dropdown-menu,
.user-dropdown.show .dropdown-menu,
.user-dropdown .dropdown-menu:hover,
.user-dropdown .dropdown-menu.show {
    display: block;
}

.dropdown-item-logout {
    color: #dc3545;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    transition: all 0.2s ease;
}

.dropdown-item-logout:hover {
    background-color: rgba(220, 53, 69, 0.08);
    color: #b02a37;
}

/* --------------------------------------------------------------------------
   Booking Calendar Grid & Selectors
   -------------------------------------------------------------------------- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.service-btn,
.doctor-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: #ffffff;
    transition: all 0.2s;
    text-align: left;
}

.service-btn:hover,
.doctor-btn:hover {
    border-color: rgba(19, 127, 236, 0.5);
}

.service-btn.active,
.doctor-btn.active {
    border: 2px solid var(--primary-color);
    background-color: rgba(19, 127, 236, 0.05);
    padding: calc(1rem - 1px);
}

.service-btn .icon-container,
.doctor-btn .icon-container {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.service-btn.active .icon-container,
.doctor-btn.active .icon-container {
    background-color: #ffffff;
}

.service-btn .check-icon,
.doctor-btn .check-icon {
    display: none;
    margin-left: auto;
    color: var(--primary-color);
}

.service-btn.active .check-icon,
.doctor-btn.active .check-icon {
    display: block;
}

.date-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.date-btn:hover {
    background-color: #f1f5f9;
}

.date-btn:disabled,
.date-btn.disabled,
.date-btn.weekend-date {
    opacity: 0.32 !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    pointer-events: none;
}

.date-btn:disabled:hover,
.date-btn.disabled:hover,
.date-btn.weekend-date:hover {
    background-color: transparent !important;
    color: #94a3b8 !important;
}

.date-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(19, 127, 236, 0.3);
}

.time-btn {
    width: 100%;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
    transition: all 0.2s;
}

.time-btn:hover {
    border-color: rgba(19, 127, 236, 0.5);
    background-color: rgba(19, 127, 236, 0.05);
}

.time-btn.active {
    border: 2px solid var(--primary-color);
    background-color: rgba(19, 127, 236, 0.05);
    color: var(--primary-color);
    padding: calc(0.75rem - 1px) calc(0.5rem - 1px);
}

/* --------------------------------------------------------------------------
   Footer Link Resets for User Pages
   -------------------------------------------------------------------------- */
footer a,
.footer-link {
    color: #475569;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.15s ease-in-out;
}

footer a:visited,
.footer-link:visited {
    color: #475569;
    text-decoration: none !important;
}

footer a:hover,
footer a:focus,
.footer-link:hover,
.footer-link:focus {
    color: var(--primary-color);
    text-decoration: none !important;
}

footer a:active,
.footer-link:active {
    color: #0f172a;
    text-decoration: none !important;
}