/* ===================================
   Bailatica - Common App Styles
   =================================== */

/* ========== CSS Custom Properties ========== */
:root {
    --primary-pink: #F7559A;
    --primary-purple: #f5247d;
    --light-purple: #f986b7;
    --light-pink: #fcb6d4;
    --dark-purple: #f5247d;
    --gradient-primary: linear-gradient(135deg, #F7559A 0%, #FF8A65 100%);
    --gradient-light: linear-gradient(135deg, #fcb6d4 0%, #f986b7 100%);
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F9F9F9;
}

/* ========== Global Resets ========== */
* {
    font-family: 'Open Sans', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 15px;
}

/* ========== Navigation ========== */
.navbar-custom {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
}
.navbar-brand img {
    height: 44px;
    width: auto;
}

.nav-link-custom {
    color: var(--text-dark) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-link-custom:hover {
    color: var(--primary-pink) !important;
}

.nav-link-custom.active {
    color: var(--primary-pink) !important;
}

.nav-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ========== Buttons ========== */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 85, 154, 0.4);
    color: white;
}

.btn-outline-custom {
    border: 2px solid var(--primary-pink);
    color: var(--primary-pink);
    background: white;
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-search {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 85, 154, 0.4);
}

.btn-reset {
    background: white;
    border: 2px solid #E0E0E0;
    color: var(--text-dark);
    padding: 0.7rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
}

/* ========== User Dropdown Menu ========== */
.user-dropdown {
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 220px;
}

.user-dropdown .dropdown-header {
    color: var(--primary-pink);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown .dropdown-item {
    font-size: 0.85rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-dropdown .dropdown-item i {
    width: 1rem;
    text-align: center;
    color: var(--text-light);
}

.user-dropdown .dropdown-item:hover {
    background-color: #fef3f8;
    color: var(--primary-pink);
}

.user-dropdown .dropdown-item:hover i {
    color: var(--primary-pink);
}

.user-dropdown .dropdown-divider {
    margin: 0.25rem 0;
}

/* ========== Language Switcher ========== */
.dropdown-item.lang-item.active,
.dropdown-item.lang-item:active {
    background-color: rgba(247, 85, 154, 0.1);
    color: var(--primary-pink);
}

.dropdown-item.lang-item:hover {
    background-color: rgba(247, 85, 154, 0.05);
}

/* ========== Cards ========== */
.card-custom {
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ========== Badges ========== */
.badge-custom {
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========== Bootstrap Toasts ========== */
.toast {
    min-width: 300px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.toast-body {
    padding: 1rem;
    font-weight: 600;
}

/* ========== Footer ========== */
.footer-custom {
    background: white;
    border-top: 1px solid #E0E0E0;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
}

.footer-logo {
    margin-bottom: 1rem;
}
.footer-logo img {
    height: 38px;
    width: auto;
}

/* ========== Utility Classes ========== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-custom {
    background: var(--gradient-primary);
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.shadow-custom-hover:hover {
    box-shadow: 0 10px 30px rgba(247, 85, 154, 0.2);
}

/* ========== Availability Grid ========== */
.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

/* ========== Select Placeholder Styling ========== */
select.form-select option[value=""],
select.form-select option:disabled {
    color: #9ca3af;
}

select.form-select:invalid,
select.form-select.is-placeholder {
    color: #9ca3af;
}

select.form-select:not(:invalid),
select.form-select:not(.is-placeholder) {
    color: var(--text-dark);
}

/* ========== Missing Profile Field Highlighting ========== */
.field-missing .form-label,
.field-missing > label,
.field-missing .section-header {
    color: var(--primary-pink) !important;
}

.field-missing .form-label::after,
.field-missing > label::after {
    content: ' *';
    color: var(--primary-pink);
    font-weight: bold;
}

.field-missing .form-control,
.field-missing .form-select {
    border-color: var(--primary-pink);
    background-color: #fff5f9;
}

.field-missing .section-header {
    position: relative;
}

.field-missing .section-header .missing-badge {
    font-size: 0.7rem;
    font-weight: normal;
    color: white;
    background: var(--primary-pink);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ========== Followed Users Widget (Instagram Stories Style) ========== */
.followed-users-container {
    background: white;
    border-bottom: 1px solid #E0E0E0;
    padding: 1rem 0;
}

.followed-users-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.followed-users-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0;
}

.followed-users-list::-webkit-scrollbar {
    display: none;
}

.followed-user-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 0.5rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.followed-user-item:hover {
    transform: translateY(-2px);
}

.followed-user-item img,
.followed-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
    background: var(--gradient-primary);
    padding: 2px;
    transition: all 0.3s ease;
}

.followed-user-item:hover img,
.followed-user-item:hover .followed-user-avatar {
    border-color: var(--primary-pink);
}

.followed-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-light);
    color: white;
}

.followed-user-avatar i {
    font-size: 2rem;
}

.followed-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.followed-users-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #E0E0E0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.followed-users-nav:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    box-shadow: 0 4px 12px rgba(247, 85, 154, 0.3);
}

.followed-users-nav-prev {
    left: -18px;
}

.followed-users-nav-next {
    right: -18px;
}

/* ========== Search Container ========== */
.search-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 2rem;
}

/* ========== Filters Sidebar ========== */
.filters-sidebar {
    background: #FAFAFA;
    padding: 2rem;
    border-right: 1px solid #E0E0E0;
    min-height: 100vh;
}

.filters-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* ========== Form Controls ========== */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #E0E0E0;
    padding: 0.6rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 0.2rem rgba(247, 85, 154, 0.1);
}

/* Placeholders and empty values - light gray */
.form-control::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

/* Select with placeholder selected */
.form-select.placeholder-selected {
    color: #9ca3af;
}

/* Select options styling */
.form-select option[value=""],
.form-select option:disabled {
    color: #9ca3af;
}

/* Reset color when real option is selected */
.form-select:not(.placeholder-selected) {
    color: var(--text-dark, #1f2937);
}

/* ========== Range Sliders ========== */
.form-range {
    height: 6px;
}

.form-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
}

.form-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-pink);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.form-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
}

.form-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
}

.form-range:focus {
    outline: none;
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem rgba(247, 85, 154, 0.25);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.25rem rgba(247, 85, 154, 0.25);
}

/* ========== User/Teacher Cards ========== */
.user-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 420px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.user-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-card-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #bbb;
    font-size: 5rem;
}

.user-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 45%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.1rem;
    color: white;
}

.user-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-card-pseudo {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.user-card-location {
    font-size: 0.82rem;
    opacity: 0.92;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-bio {
    font-size: 0.8rem;
    line-height: 1.45;
    opacity: 0.88;
    margin: 0.3rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.user-card-dance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.user-card-dance-tags .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    color: white;
}

.user-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.user-card-link:hover {
    cursor: pointer;
    transform: translateY(-6px);
}

.user-card-link:hover .user-card {
    box-shadow: 0 12px 32px rgba(247, 85, 154, 0.25) !important;
}

.user-card-top-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2;
}

.user-card-rate-badge {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-pink);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ========== Teacher Cards ========== */
.teacher-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* ========== Results Section ========== */
.results-section {
    padding: 2rem;
}

.results-header {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.results-count {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
}

/* ========== Pagination ========== */
.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--gradient-light);
    border-color: var(--primary-pink);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: #F5F5F5;
    border-color: #E0E0E0;
    color: #CCCCCC;
}

/* ========== Google Places Autocomplete ========== */
.pac-container {
    z-index: 9999;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.section-header {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header i {
    color: var(--primary-pink);
}

.section-header.text-danger i {
    color: #dc3545;
}

/* ========== Checkboxes ========== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-pink);
}

.checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
}

/* ========== Breadcrumbs ========== */
.breadcrumb-container {
    background: white;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--primary-pink);
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-light);
    font-size: 0.7rem;
}

/* ========== Responsive ========== */

/* Mobile navbar collapsed menu */
@media (max-width: 991.98px) {
    .navbar-custom .navbar-collapse {
        background: white;
        border-top: 1px solid #eee;
        margin-top: 0.75rem;
        padding: 0.75rem 0;
    }

    .navbar-custom .navbar-nav {
        gap: 0 !important;
    }

    .navbar-custom .nav-link-custom {
        padding: 0.65rem 1rem !important;
        border-radius: 10px;
        display: block;
    }

    .navbar-custom .nav-link-custom:hover,
    .navbar-custom .nav-link-custom.active {
        background: #fef3f8;
    }

    .navbar-custom .nav-link-custom.active::after {
        display: none;
    }

    .navbar-custom .navbar-nav.align-items-center {
        align-items: stretch !important;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem !important;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid #eee;
    }

    .navbar-custom .navbar-nav.align-items-center > .nav-item {
        flex: 0 0 auto;
    }

    .navbar-toggler {
        border: 2px solid var(--primary-pink) !important;
        border-radius: 10px;
        padding: 0.35rem 0.6rem;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(247, 85, 154, 0.2);
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .followed-users-nav {
        display: none;
    }
}

/* ========== Online Badge Animation ========== */
@keyframes pulse-online {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.badge.bg-success i.bi-circle-fill {
    animation: pulse-online 2s ease-in-out infinite;
}
