/* style.css - Version 3.5 */

/* Custom CSS from the original PHP file */
.recipe-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Ensure inputs use the full width in Bootstrap layout */
.form-control,
.form-select {
    box-sizing: border-box;
}

/* In style.css */
.bg-pink {
    background-color: #ff99cc !important;
    color: #333 !important;
}

/* In style.css */

/* Style for sortable headers */
#recipeAdminTable th {
    cursor: pointer;
    user-select: none;
    /* Prevents text selection on repeated clicks */
    position: relative;
}

/* Base style for the sort arrow */
#recipeAdminTable th::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    /* Subtle by default */
    border: 4px solid transparent;
}

/* ASCENDING indicator (up arrow) */
#recipeAdminTable th.sorted-asc::after {
    content: '▲';
    /* Up arrow symbol */
    opacity: 1;
    /* Darken when active */
}

/* DESCENDING indicator (down arrow) */
#recipeAdminTable th.sorted-desc::after {
    content: '▼';
    /* Down arrow symbol */
    opacity: 1;
    /* Darken when active */
}

/* From includes/header.php */
:root {
    /* Stripe-inspired Palette */
    --col-stripe-blurple: #635bff;
    /* Stripe Blurple (Primary) */
    --col-stripe-dark: #0a2540;
    /* Dark text/background */
    --col-stripe-light: #f6f9fc;
    /* Light background */
    --col-stripe-white: #ffffff;
    --col-stripe-slate: #425466;
    /* Muted text */
    --col-stripe-success: #3ecf8e;
    /* Success Green */
    --col-stripe-warning: #f6a723;
    /* Warning Orange */
    --col-stripe-danger: #ff6b6b;
    /* Danger Red */

    /* Mapping to Theme Variables */
    --brand-primary: var(--col-stripe-blurple);
    --brand-accent: #00d4ff;
    /* A bright accent often used by Stripe */
    --brand-success: var(--col-stripe-success);
    --bg-light: var(--col-stripe-light);
    --text-dark: var(--col-stripe-dark);
    --text-muted: var(--col-stripe-slate);

    /* Bootstrap Overrides */
    --bs-body-bg: var(--bg-light);
    --bs-body-color: var(--text-dark);
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: 99, 91, 255;
    /* RGB of #635bff */
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: #4b45c6;
    /* Darker blurple */
    --bs-border-color: #e6e6e6;
}

body {
    background-color: var(--bg-light);
    padding-top: 80px;
    padding-bottom: 80px;
    /* Increased from 70px to account for taller nav */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    /* Stripe uses this for crisp text */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* Headings - Changed to Darker Green */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    color: var(--text-dark) !important;
    /* Stripe uses dark headings */
    font-weight: 700;
}

/* Ensure text on primary background is white */
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-primary h5,
.bg-primary h6,
.btn-primary,
.btn-primary:hover,
.nav-pills .nav-link.active {
    color: #fff !important;
}

/* Navbar Styling */
.navbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    /* Translucent white */
    backdrop-filter: saturate(180%) blur(20px);
    /* Apple/Stripe style blur */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Very subtle border */
    padding: 0.75rem 0;
    min-height: 70px;
}

.navbar-brand {
    font-weight: 800;
    /* Extra bold */
    color: var(--brand-primary) !important;
    letter-spacing: -0.5px;
    font-size: 1.5rem;
    /* Slightly smaller for mobile fit */
    padding: 0;
    margin-right: 0.5rem;
    display: flex;
    align-items: baseline;
    font-family: 'Inter', sans-serif;
}

/* Icon Navigation */
.nav-icon-link {
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0.5rem;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

.nav-icon-link:hover,
.nav-icon-link.active {
    color: var(--brand-primary);
    background-color: rgba(99, 91, 255, 0.08);
    /* Light blurple bg */
}

.nav-icon-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 1200px) {
    .nav-icon-link {
        width: auto;
        border-radius: 20px;
        /* Pill shape */
        padding: 0.5rem 1rem;
    }

    .nav-icon-label {
        display: inline-block;
    }
}

/* Bottom Nav Styling */
.bottom-nav {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1030;
    padding-top: 0.5rem;
    /* Added padding top */
    padding-bottom: 0.5rem;
    /* Added padding bottom for balance */
}

.bottom-nav-link {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    /* Reduced internal padding */
    font-size: 0.75rem;
    font-weight: 600;
    flex: 1;
}

.bottom-nav-link i {
    font-size: 1.2rem;
    margin-bottom: 4px;
    /* Increased margin between icon and text */
}

.bottom-nav-link.active,
.bottom-nav-link:hover {
    color: var(--brand-primary);
}

/* Global Link Styling */
a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: #4b45c6;
    text-decoration: none;
    /* Stripe usually doesn't underline */
}

/* Buttons */
.btn {
    border-radius: 20px;
    /* Pill buttons */
    font-weight: 600;
    transition: all 0.15s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    /* Subtle shadow */
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4b45c6;
    --bs-btn-hover-border-color: #4b45c6;
    --bs-btn-active-bg: #3a369e;
    --bs-btn-active-border-color: #3a369e;
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-primary);
    --bs-btn-hover-border-color: var(--brand-primary);
}

/* FIX: btn-light hover state */
.btn-light {
    --bs-btn-color: var(--text-dark);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #e6e6e6;
    --bs-btn-hover-color: var(--brand-primary);
    /* Primary text on hover */
    --bs-btn-hover-bg: #fff;
    /* Keep white background */
    --bs-btn-hover-border-color: var(--brand-primary);
}

.btn-join {
    background-color: var(--brand-primary);
    color: white;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
}

.btn-join:hover {
    background-color: #4b45c6;
    color: white;
}

/* Nav Pills Override */
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
    background-color: var(--brand-primary);
    color: #fff !important;
    box-shadow: 0 4px 6px rgba(99, 91, 255, 0.25);
    /* Colored shadow */
}

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

.text-muted {
    color: var(--text-muted) !important;
}

.text-danger {
    color: var(--col-stripe-danger) !important;
}

.text-success {
    color: var(--col-stripe-success) !important;
}

/* Cards */
.card {
    background-color: #ffffff;
    border: none;
    /* Remove border */
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07) !important;
    /* Stripe-style deep shadow */
    border-radius: 8px;
    /* Slightly sharper corners than before */
}

/* Modern Notification Badge */
.badge-dot {
    height: 16px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 10px;
    background-color: var(--col-stripe-danger);
    color: white;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    top: 2px !important;
    right: 2px !important;
}

/* Bottom Nav Badge */
.bottom-nav-badge {
    top: 5px !important;
    right: 25% !important;
}

.nav-profile-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #adb5bd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-input:focus {
    background-color: #fff !important;
    border: 1px solid var(--brand-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 91, 255, 0.25);
}

/* Dropdown Menu */
.dropdown-menu {
    background-color: #ffffff;
    border: none;
    box-shadow: 0 50px 100px -20px rgba(50, 50, 93, 0.25), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
}

.dropdown-item {
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.dropdown-item:hover {
    background-color: #f6f9fc;
    color: var(--brand-primary);
}

/* Sidebar Scrollable */
.sidebar-scrollable {
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.sidebar-scrollable::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* From user_profile.php */
.letter-spacing-1 {
    letter-spacing: 0.05rem;
}

.smaller {
    font-size: 0.75rem;
}

.w-20 {
    width: 20px;
}

.hover-shadow:hover {
    box-shadow: 0 18px 35px rgba(50, 50, 93, 0.1), 0 8px 15px rgba(0, 0, 0, 0.07) !important;
    transform: translateY(-2px);
}

.group-hover-zoom:hover img {
    transform: scale(1.05);
}

.profile-cover-wrapper {
    height: 180px;
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    /* Changed to match body background */
}

.profile-cover-wrapper img {
    width: 100%;
    height: auto;
    /* min-height: 100%;  Uncomment if you want to ensure no vertical gaps for very wide images */
}

.profile-cover-default {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #0a2540 100%);
}

.profile-avatar {
    width: 160px;
    height: 160px;
}

@media (max-width: 768px) {
    .profile-cover-wrapper {
        height: 120px;
    }

    .profile-header-info {
        margin-top: -60px !important;
    }

    .profile-avatar {
        width: 120px !important;
        height: 120px !important;
    }
}

/* From index.php */
.profile-cover-wrapper-small {
    height: 70px;
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    /* Changed to match body background */
}

.profile-cover-wrapper-small img {
    width: 100%;
    height: auto;
}

.profile-cover-default-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #0a2540 100%);
}

/* From messages.php */
.typing-dots span {
    width: 6px;
    height: 6px;
    background: #9197a3;
    border-radius: 50%;
    display: inline-block;
    animation: bounce 1.3s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
}

.contact-list {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (min-width: 768px) {
    .chat-container {
        flex-direction: row;
    }

    .contact-list {
        display: flex;
        width: 33.3333%;
        border-right: 1px solid #e2e8f0;
    }

    .chat-area {
        display: flex;
        width: 66.6667%;
    }
}

/* From businesses.php */
.hover-shadow-lg:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease;
}

.bg-soft-primary {
    background-color: #f6f9fc;
    /* Stripe Light */
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Utility for object-fit */
.object-fit-cover {
    object-fit: cover !important;
}