/* ============================================================
   Page general layout
   ============================================================ */
body {
    margin: 0;
    background-color:hsl(var(--background));
    min-height: 100vh;
}

.shared_pages_maincontent {
    background-color:hsl(var(--background));
    color: hsl(var(--foreground));
}

/* ============================================================
   Dash Dropdown overrides (React Select v1 fix for dark theme)
   ============================================================ */
/* Dropdown menu container */
.Select-menu-outer {
    color: hsl(var(--background)) !important;
}

/* Dropdown options */
.Select-menu-outer .Select-option {
    color: hsl(var(--background)) !important;
    opacity: 1 !important;
}

/* Placeholder text */
.Select-control .Select-placeholder {
    color: hsl(var(--muted-foreground)) !important;
    opacity: 1 !important;
}

/* ============================================================
   Header
   ============================================================ */
.shared_header_general {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    top: 0;
    padding: 1rem 2rem;
    background-color: hsl(var(--background) / 0.8);
    border-bottom: 1px solid hsl(var(--border) / 0.5);
    backdrop-filter: blur(20px);
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   Primary Button
   ============================================================ */
.shared_button_primary {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary-foreground)) !important;
    text-decoration: none !important;
    border-radius: 12px !important;    
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important; 
}

.shared_button_primary:hover {
    background-color: hsl(var(--primary) / 0.9) !important;
}

/* ============================================================
   Secondary Button
   ============================================================ */
.shared_button_secondary {
    background-color: transparent !important;
    color: hsl(var(--muted-foreground)) !important;
    border: none !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    box-shadow: none !important; 
}

.shared_button_secondary:hover {
    background-color: hsl(var(--primary) / 0.9) !important;
    color: hsl(var(--foreground)) !important;
}

/* ============================================================
   Tertiary Button
   ============================================================ */
.shared_button_tertiary { /* Inside html.A */
    background: none;
    border: none;
    font-size: 0.87rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: color 0.2s ease;
    box-shadow: none !important; 
}

.shared_button_tertiary:hover {
    color: hsl(var(--primary));
}

/* ============================================================
   Icon Button
   ============================================================ */

.shared_button_icon {
    background-color: transparent !important;
    border: 1px solid hsl(var(--border)) !important;
    color: hsl(var(--foreground)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 100px !important;
    text-decoration: none !important;
    padding: 6px !important;
    min-width: 8rem !important;     
    box-shadow: none !important; 
}

.shared_button_icon:hover {
    border: 1px solid hsl(var(--primary)) !important;
}

/* ============================================================
   chatbot Button
   ============================================================ */

.shared_button_chatbot {
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    position: fixed;
    padding: 1rem;
    border-radius: 50% !important;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.shared_button_chatbot:hover {
    transform: scale(1.1) !important;
    box-shadow: var(--shadow-glow) !important;
}

/* ============================================================
   Text 
   ============================================================ */
/* Big title */
.shared_title_bigprimary {
    color: hsl(var(--foreground));
    max-width: 40rem;
    font-size: 3.1rem;
    font-weight: 700;
}

/* Gradient */
.shared_text_gradient  {
    background: linear-gradient(to right, #8ee3e6, #00e5ff);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

/* General text */
.shared_text_general {
    color: hsl(var(--muted-foreground)) !important;
    font-size: 0.87rem;
}

/* Error */
.shared_text_error  {
    color: hsl(var(--destructive)) !important;
    font-size: 0.87rem !important;
    margin-top: 0.625rem !important;
}

/* ============================================================
   Modal
   ============================================================ */
.shared_modal .modal-content {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    padding: 0.5rem;
}

.shared_modal .btn-close {
    filter: invert(1); /* SVG, color property dont work */
}

.shared_modal_title {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--accent-foreground));
}

.shared_modal_text_description {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

/* ============================================================
   Form elements
   ============================================================ */
/* Total container Form */
.shared_form_container{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

/* Field */
.shared_form_field_container {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Label */
.shared_form_label {
    font-size: 0.87rem;
    color: hsl(var(--foreground));
}

/* Input */
.shared_form_input {
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    -webkit-text-fill-color: hsl(var(--foreground)) !important;
    border-radius: 8px;
    padding: 0.625rem;
    font-size: 0.87rem;
    color: hsl(var(--background));
    outline: none;
    transition: border 0.2s ease;
}

.shared_form_input:focus {
    border-color: hsl(var(--primary));
    background-color: hsl(var(--background)) !important;
    color: hsl(var(--foreground)) !important;
    box-shadow: none !important;
    outline: none;
}

.shared_form_input::placeholder {
    color: hsl(var(--foreground)) !important;
}

/* Input Fix Web Autofill */
.shared_form_input:-webkit-autofill {
    background-color: hsl(var(--background)) !important;
    -webkit-box-shadow: 0 0 0 1000px hsl(var(--background)) inset !important;
    -webkit-text-fill-color: hsl(var(--foreground)) !important;
}

/* Input Invalid value */
.shared_form_input.invalid {
    border: 1px solid hsl(var(--destructive)) !important;
    box-shadow: none !important;
    background-color: hsl(var(--background)) !important;
    color: hsl(var(--foreground)) !important;
    -webkit-text-fill-color: hsl(var(--foreground)) !important;
}

.shared_form_input:invalid:not(:focus) {
    background-color: hsl(var(--background)) !important;
}

/* ============================================================
   Dropdown
   ============================================================ */

/* Principal container */
.shared_dropdown.has-value .Select-control {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background-color: hsl(var(--background)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: 8px;
    padding: 0.625rem !important;
    font-size: 0.87rem !important;
    box-shadow: none !important;
    margin-left: 0 !important;
    -webkit-text-fill-color: hsl(var(--foreground)) !important;
    height: 44px !important;
}

.shared_dropdown .Select-value {
    color: hsl(var(--foreground)) !important;
    font-size: 0.87rem !important;
    padding: 0.6rem !important;
    display: flex;
    align-items: center;
}

.shared_dropdown .Select-control .Select-placeholder {
    color: hsl(var(--foreground)) !important;
    font-size: 0.87rem !important;
    box-shadow: none !important;
}

.shared_dropdown.is-focused .Select-control {
    border-color: hsl(var(--primary)) !important;
    background-color: hsl(var(--background)) !important;
    box-shadow: none !important;
}

.shared_dropdown .Select-menu-outer {
    background-color: hsl(var(--background)) !important;
    color: hsl(var(--foreground)) !important;
    font-size: 0.87rem !important;
}

.shared_dropdown .Select-option {
    background-color: hsl(var(--background)) !important;
    color: hsl(var(--foreground)) !important;
}

.shared_dropdown .Select-option.is-focused {
    background-color: hsl(var(--accent)) !important;
}

.shared_dropdown.is-invalid .Select-control {
    border: 1px solid hsl(var(--destructive)) !important;
    background-color: hsl(var(--background)) !important;
    color: hsl(var(--foreground)) !important;
}

/* ============================================================
   Alert
   ============================================================ */
.shared_alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 0.75rem 0.875rem;
    font-size: 0.87rem;
    box-shadow: none;
}

.shared_alert p {
    margin: 0;
}

/* ============================================================
   Modules Banner
   ============================================================ */

.shared_banner_general_container{
    background-color: hsl(var(--background));
    margin: 5.5rem 0 1rem 0;
    padding: 1rem 2rem 0.5rem 2rem;
    align-items: center;
}

.shared_banner_module_text {
    color: hsl(var(--foreground));
    font-size: 1.25rem;
    font-weight: 700;
}

.shared_banner_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shared_banner_content_right {
    display: flex;
    align-items: center;
    gap: 20px; 
}

@media (max-width: 850px) {
    .shared_banner_row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .shared_banner_content_right {
        gap: 1rem;
    }
}

/* ============================================================
   Datepicker
   ============================================================ */

/* Principal container */
.shared_datepicker .DateRangePickerInput {
    background-color: transparent;
    border: 1px solid hsl(var(--muted-foreground));
    border-radius: 999px;
    padding: 6px;
    display: flex;
    align-items: center;
}

.shared_datepicker .DateInput {
    background-color: transparent !important;
}

.shared_datepicker .DateInput_input {
    background-color: transparent !important;  
    color: hsl(var(--foreground)) !important;
    border: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    font-style: normal;
    padding: 0;
}

/* ============================================================
   Modules tabs
   ============================================================ */

.shared_tab .tab{
    font-weight: 500 !important;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--background)) !important;
    padding: 8px !important;
    cursor: pointer !important;
    background-color: hsl(var(--secondary)) !important;
    border-radius: 15px !important;
    margin-right: 10px !important;
}

/* .shared_tab .tab:last-child {
    margin-right: 0 !important;
} */

.shared_tab .tab--selected {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--foreground)) !important;
    border-bottom: none !important;
}

.shared_tab .tab:hover {
    background-color: hsl(var(--accent)) !important;
}

@media (max-width: 800px) {
    .shared_tab .tab {
        margin-bottom: 8px !important;
        max-width: calc(100% - 1rem) !important; 
    }
}