/* ==========================================================================
   AppLab / Alberto Marson - Global Application Stylesheet
   ========================================================================== */

: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;
}

/* 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);
}

.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 on Hover */
.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;
}

/* Invisible bridge: covers gap between avatar and dropdown so hover is never lost */
.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 {
    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 {
    border-color: rgba(19, 127, 236, 0.5);
}

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

.service-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 {
    background-color: #ffffff;
}

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

.service-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.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);
}
