/*
Theme Name: Timeless Blog Child
Theme URI: https://phuket-travel-experience.com/
Description: A child theme for Timeless Blog
Author: Martech
Author URI: https://phuket-travel-experience.com/
Template: timeless-blog
*/

/* STICKY FOOTER FIXES */
body { min-height: 100vh !important; display: flex !important; flex-direction: column !important; margin: 0 !important; }
#page { flex-grow: 1 !important; display: flex !important; flex-direction: column !important; }
#primary-content, #content { flex-grow: 1 !important; }

/* ADMIN BAR SCROLLBAR FIX (Two separate rules needed due to height change) */
body.admin-bar { min-height: calc(100vh - 32px) !important; }
@media screen and (max-width: 782px) { body.admin-bar { min-height: calc(100vh - 46px) !important; } }

/* LAYOUT / CONTENT TWEAKS INHERITED FROM PARENT */
.no-sidebar .theme-wrapper #secondary, .no-sidebar .theme-wrapper #primary { width: 100% !important; }
.site-main article .entry-content { margin-top: 0; }
.site-main article .entry-content p { margin-bottom: 10px; }
.site-main article .entry-footer { display: flex; margin-top: 10px; margin-bottom: 6px; }
.site-main article .entry-footer .tags-links { flex-grow: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.site-main article .entry-footer span { font-size: 16px; font-weight: bold; }
.site-main article .entry-footer span a, .site-main article .entry-footer span span { font-weight: normal; }
.site-main article .entry-footer span a { text-decoration: none; color: var(--theme-text-hue); }
.site-main article .entry-footer span a:hover { color: var(--theme-primary-hue); }
.site-main article .entry-footer span.comments-link a { font-weight: bold; }

/* SINGLE POST / PAGE HEADER TWEAKS (optional, can be removed if not needed) */
body.single .single-page .page-header-content { display: flex; flex-direction: column; gap: 3px; margin-block-start: 14px; }
body.single .single-page .page-header-content .entry-cat .cat-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
body.single .single-page .page-header-content .entry-cat .cat-links a { color: #ffff; font-weight: 600; line-height: 8px; padding: 6px 8px; border-radius: 20px; margin-block-end: 4px; letter-spacing: 0.5px; display: inline-block; text-decoration: none; margin-inline-end: 4px; padding-inline-end: 8px; text-transform: uppercase; background: var(--custom-categories-hue); font-size: calc(var(--typo-xxs) - 1px); border: 1px solid var(--theme-text-hue); transition: all 0.3s cubic-bezier(.5, 2.5, .7, .7); }
body.single .single-page .page-header-content .entry-cat .cat-links a:hover, body.single .single-page .page-header-content .entry-cat .cat-links a:focus-within { box-shadow: 1px 2px 0 0px var(--theme-text-hue); transform: translate(-2px, -2px); }
body.single .single-page .page-header-content .entry-header .entry-title { margin: 0; line-height: 1.2; font-size: var(--typo-xl); }
body.single .single-page .page-header-content .entry-meta .post-author img { width: 34px; height: 34px; flex-shrink: 0; border-radius: 100%; }
body.single .single-page > .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; margin-top: 16px; }
body.single .single-page .page-header-content .entry-meta { margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ACCESSIBILITY / UTILITIES (copied to keep behavior consistent) */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background-color: #f1f1f1; border-radius: 3px; box-shadow: 0 0 2px 2px rgba(0,0,0,0.6); clip: auto !important; clip-path: none; color: #21759b; display: block; font-size: 0.875rem; font-weight: 700; height: auto; left: 5px; line-height: normal; padding: 15px 23px 14px; text-decoration: none; top: 5px; width: auto; z-index: 100000; }
#primary[tabindex="-1"]:focus { outline: 0; }

/* Alignments */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1.5em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1.5em; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; margin-bottom: 1.5em; }

/* LANGUAGE SWITCHER + NAVIGATION FIXES */

/* Make sure parent header sits ABOVE the main nav & search so dropdown can overlap */
.site-middle-header { position: relative; z-index: 20; overflow: visible; }

/* Slightly normalize the header alignment for the language switcher */
.main-navigation .sub-menu a { display: block; }
.middle-header-right { display: flex; align-items: center; justify-content: flex-end; }
.site-middle-header-wrapper { align-items: center; }

/* Container: create stacking context above theme-main-header + search */
.lang-switcher-dropdown { position: relative; display: inline-block; z-index: 1000 !important; }

/* Trigger: current language button */
.lang-current-trigger a { display: flex; align-items: center; text-decoration: none; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; background-color: #fff; border-radius: 3px; min-width: 120px; box-sizing: border-box; }

/* Child dropdown list – NO gap, sits directly under trigger, sits above search icon */
.lang-hidden-options { display: none; position: absolute; top: calc(100% - 1px); left: 0; min-width: 120px; margin-top: 0; z-index: 1001; background-color: #fff; border: 1px solid #ccc; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* Keep dropdown visible while hovering anywhere over the container */
.lang-switcher-dropdown:hover .lang-hidden-options { display: block !important; }

/* Individual language rows */
.lang-item-option a { display: block; padding: 8px 10px; white-space: nowrap; text-decoration: none; border-bottom: 1px solid #eee; }
.lang-item-option a:hover { background-color: #f5f5f5; }

/* Flag + name spacing */
.lang-current-trigger img, .lang-item-option img { margin-right: 5px; }
.lang-current-trigger .lang-name, .lang-item-option .lang-name { font-weight: 600; }

/* Lower search area below language dropdown so it doesn't interfere */
.main-header-right, .header-search, .header-search-wrap, .header-search-icon, .header-search-form { position: relative; z-index: 1; }
