/* * 02_layout.css 
 * Contains: Site logo, main header, user info, search, controls, dropdowns
 */

/* ---------------------------------- */
/* 3. Logo                         */
/* ---------------------------------- */
.site-logo {
    width: 300px;
    height: 300px; 
    margin: 0 auto; 
    background-image: url('../img/tv_logo.png');
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center; 
    cursor: pointer; 
    transition: background-image 0.2s ease-in-out;
}

.site-logo:hover {
    background-image: url('../img/tv_logo_hover.png'); /* Hover image */
}

/* ---------------------------------- */
/* 5. Main App Header (User Info)  */
/* ---------------------------------- */
#userInfo {
    display: flex;
    flex-direction: column; /* Stacks the two lines */
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: var(--text-color-secondary);
	gap: 10px;
    margin-bottom: 20px;
}

/* Container for the first line (Welcome + buttons) */
.user-info-main {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on very small screens */
    justify-content: center;
    align-items: center;
    gap: 15px; /* Space between "Welcome", profile icon, and logout */
}

/* Container for the second line (Feedback) */
.user-info-secondary {
	font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px; /* Space between icon and text */
	margin-top: 10px;
}

/* Style for the new feedback icon */
.feedback-icon-svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-color-secondary);
}

#userInfo button {
    background: none;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

#userInfo button:hover {
    background-color: var(--danger-color);
    color: white;
}

/* General header link style */
.header-link {
    color: var(--text-color-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.header-link:hover {
    color: var(--primary-color);
}

.header-link.header-icon-link {
    color: var(--text-color-secondary); 
    transition: color 0.2s ease;
    margin: 0 5px; 
}
.header-link.header-icon-link:hover {
    color: var(--primary-color); 
}

.profile-icon {
    width: 24px; 
    height: 24px;
    stroke-width: 2px;
    vertical-align: middle; 
}

/* ---------------------------------- */
/* 6. Search & Controls            */
/* ---------------------------------- */
.search-container {
    display: flex;
    margin-bottom: 10px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#searchInput, #exploreSearchInput {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--surface-color);
    color: var(--text-color);
    font-size: 16px;
    outline: none;
}

#searchInput:focus, #exploreSearchInput:focus {
    border-color: var(--primary-color);
}

#searchResults {
    position: relative;
    max-width: 600px;
    margin: -10px auto 20px auto;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    z-index: 10;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #2c2c2c;
}

/* Sort & View buttons container */
.controls-container {
    display: flex;
    justify-content: center;
    gap: 25px; /* [!code change] Was 15px, user requested 35px */
    margin-bottom: 25px;
    flex-wrap: nowrap;
	align-items: center; /* [!code --] */
	align-items: flex-start; /* [!code ++] Aligns new items to the top */
}

/* [!code start] */
/* New wrapper for icon + label */
.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Space between icon and label */
    min-width: 60px; /* Give them some breathing room */
}

/* New label style */
.control-label {
    font-size: 0.75rem; /* 12px */
    color: var(--text-color-secondary);
    font-weight: 300;
}

/* Calendar icon link (placed here for layout) */
.calendar-link {
    font-size: 1.6rem; /* Sets the icon size (approx 26px) */
    color: var(--text-color-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.calendar-link:hover {
    color: var(--primary-color);
}

.calendar-link img {
    width: 35px; 
    height: 35px; 
    transition: opacity 0.2s ease;
    opacity: 0.8; 
    display: block; 
}

.calendar-link:hover img {
    opacity: 1; 
}

.control-icon-btn {
    background-color: var(--surface-color);
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    width: 42px;  /* Making it a nice circle */
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem; /* Icon size */
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* Reset padding */
}

.control-icon-btn:hover {
    background-color: #2c2c2c;
    color: var(--text-color);
    border-color: var(--primary-color);
}

.control-icon-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.control-icon-btn .fas {
    line-height: 1; /* Helps center the icon */
    width: auto; /* Reset Font Awesome default */
}

/* Dropdown Styles */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background-color: var(--surface-color);
    color: var(--text-color-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px; /* Gives a consistent width */
    justify-content: space-between;
}

.dropdown-toggle:hover {
    background-color: #2c2c2c;
    color: var(--text-color);
}

.dropdown-toggle span {
    color: var(--text-color); /* Make the active value stand out */
    font-weight: bold;
}

.dropdown-arrow {
    width: 14px;
    height: 14px;
    stroke: var(--text-color-secondary);
    transition: transform 0.2s ease;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 110%; /* Position below the button */
    left: 0;
    right: 0;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 0;
    z-index: 50; /* Above show cards but below modals */
    min-width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ============================ */
/* === HEADER LANGUAGE FLAG === */
/* ============================ */

.user-info-main {
    display: flex; /* Ensures items align in a row */
    align-items: center; /* Vertically centers the items */
    gap: 10px; /* Adds space between all items */
}

.header-lang-flag {
    width: 30px;
    height: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    border: 1px solid #555;
    /* No margin-left needed, 'gap' on parent handles it */
}