/* =============================================
   Advance Seeds — Global Layout CSS
   Extracted from layouts/app.blade.php
   ============================================= */

/* --- Fonts --- */
@font-face {
    font-family: 'SukhumvitSetBold';
    src: url('/fonts/SukhumvitSet-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SukhumvitSetLight';
    src: url('/fonts/SukhumvitSet-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SukhumvitSet';
    src: url('/fonts/SukhumvitSet-Medium.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- Variables --- */
:root {
    --avs-color-01: #ed145b;
    --avs-color-02: #008000;
    --avs-color-03: #090;
    --avs-color-04: #0b500e;
    --avs-color-05: #c0a12a;
    --avs-color-01d: #FF9DBE;
    --avs-header-height: 50px;
    --avs-nav-height: 90px;
    --avs-main-height: calc(100dvh - (var(--avs-header-height) + var(--avs-nav-height)));
    --avs-card-image-height: 200px;
    --r-heading-font: SukhumvitSet;
    --r-main-font: SukhumvitSet;
    --r-heading2-size: 1.2em;
    --r-main-font-size: 26px;
    --right-position: calc(5dvw + 8px);
}
@media only screen and (max-width: 767px) {
    :root {
        --avs-header-height: 30px;
        --avs-nav-height: 90px;
    }
}

/* --- Base --- */
html, body {
    scroll-behavior: smooth;
}
body {
    background-color: white;
    min-height: 100dvh !important;
    position: relative !important;
}
@keyframes trigger_position {
    0%   { position: fixed !important; }
    100% { position: relative !important; }
}

/* --- Header --- */
header {
    background-color: whitesmoke;
    font-family: "SukhumvitSet", serif;
}
header > div > .row {
    height: 50px;
}
header a,
header li {
    color: #444;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}
header .div-social a {
    height: 24px;
    width: 24px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 4px;
}

/* --- Nav --- */
nav {
    background: linear-gradient(90deg, rgba(245,245,245,1) 0%, rgba(255,255,255,1) 15%, rgba(245,245,245,1) 100%);
    box-shadow: 0 1px 2px -1px rgba(0,0,0,.2), 0 2px 3px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
    font-family: "SukhumvitSet", serif;
    position: sticky !important;
    top: calc(var(--avs-nav-height) * -1);
    z-index: 50;
    transition: 0.6s ease-in-out;
}
nav .navbar-brand img {
    width: 64px;
}
nav .nav-item {
    width: fit-content;
}
nav .nav-item .nav-link {
    color: var(--avs-color-02);
    border-radius: 4px;
    font-size: 16px;
    transition: 0.3s all ease-in;
    border: 1px solid transparent;
    padding: 8px 4px;
    line-height: 16px;
}
nav .nav-item .nav-link:hover {
    color: white !important;
    background-color: var(--avs-color-01);
    box-shadow: rgba(50,50,93,.25) 0px 6px 12px -2px, rgba(0,0,0,.3) 0px 3px 7px -3px;
}
nav .nav-item .nav-link.active {
    color: white !important;
    background-color: var(--avs-color-01);
}
nav div:has(>#google_translate_element) {
    top: 74px;
    right: 0;
    z-index: 0;
    width: fit-content;
    position: absolute !important;
}
nav div:has(>#google_translate_element) #google_translate_element > div {
    backdrop-filter: blur(3px) opacity(0.5) drop-shadow(2px 4px 6px white);
    padding: 2px 4px;
    user-select: none;
}
nav div:has(>#google_translate_element) #google_translate_element img {
    width: 42px;
    height: 16px;
}
nav div:has(>#google_translate_element) #google_translate_element a {
    position: relative;
    width: auto;
    height: auto;
    box-shadow: none;
    border: 0;
}
nav > .container {
    z-index: 1;
    position: relative;
}
nav .black-ribbon {
    position: fixed;
    z-index: 1;
    width: 64px;
    top: 0;
}
nav.navJs {
    top: 0 !important;
}

/* --- Main --- */
main {
    position: relative;
    min-height: var(--avs-main-height);
    font-family: "SukhumvitSet", serif;
    overflow-x: hidden;
    overflow-y: auto;
}
main h1, main h2, main h3, main h4, main h5, main h6 {
    font-weight: 700;
    font-family: "SukhumvitSetBold", serif;
}
main > section {
    position: relative;
    display: flex;
    min-height: calc(var(--avs-main-height));
    text-align: center;
    padding-bottom: 16px;
    z-index: 1;
}
main > section > div {
    margin-top: auto;
    margin-bottom: auto;
    z-index: 1;
}
main > section:first-child {
    padding-top: 36px;
}
main .container {
    position: relative;
    z-index: 1;
}
main .layout-bg {
    position: absolute;
    bottom: 0;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: cover;
    aspect-ratio: 1/1;
    right: 1dvw;
    height: 20dvh;
}
main::before {
    content: '';
    position: absolute;
    z-index: 1;
    opacity: 0.2;
    background-attachment: fixed;
    aspect-ratio: 1/1;
    background-position-x: calc(100vw - 20vw - calc((6vh + 52px) * 1));
    background-position-y: 90%;
    background-repeat: no-repeat;
    height: 100%;
    width: 99vw;
}

/* --- Floating buttons --- */
section#floating {
    position: sticky;
    bottom: 5vh;
    display: block;
    width: 100%;
    margin-left: auto;
    transition: 0.6s all ease-in-out;
    z-index: 2;
}
section#floating div:has(>button, >a) {
    position: relative;
    min-width: 48px;
    min-height: 48px;
}
section#floating button,
section#floating a {
    position: absolute;
    z-index: 1;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 48px;
    height: 48px;
    border: 4px solid lightgrey;
}
section#floating #btn-toTop {
    display: none;
    bottom: 0;
    right: calc(var(--right-position) - 5px);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    background-color: var(--avs-color-04);
    color: white;
    font-size: 24px;
    line-height: 24px;
    border: 4px solid white;
    padding-bottom: 4px;
}
section#floating #btn-toTop i,
section#floating #btn-toTop svg {
    font-size: 24px !important;
}
section#floating #floatMenu {
    position: absolute;
    z-index: 1;
    bottom: calc(56px + 8px + 8px);
    right: var(--right-position);
    width: 48px;
    transition: 0.3s ease-out all;
}
section#floating #floatMenu div:has(>button),
section#floating #floatMenu button,
section#floating #floatMenu a {
    position: relative;
    height: 48px !important;
    width: 48px;
    box-shadow: none;
}
section#floating #floatMenu button,
section#floating #floatMenu a {
    border: 4px #fff solid;
}
section#floating #floatMenu :is(button, a) + div {
    width: max-content;
    z-index: 1;
    color: var(--avs-color-02);
    right: 24px;
    top: calc(50% - 16px);
    border-radius: 6px;
    font-size: 14px;
    padding: 6px 0px;
    transition: 0.12s ease-out all;
    background-color: transparent;
    border: 4px solid white;
    z-index: -1;
}
section#floating .show :is(button, a) + div {
    background-color: white !important;
    width: max-content !important;
    padding: 6px 28px 6px 12px !important;
    box-shadow: rgba(0,0,0,.19) 0px 8px 16px, rgba(0,0,0,.23) 0px 4px 4px !important;
}
section#floating #btn-floatMenu {
    position: absolute;
    bottom: 8px;
    right: calc(var(--right-position) - 4px);
    height: 56px;
    width: 56px;
    border-color: #FFF;
    border-width: 2px;
    transition: 0.3s ease-out all;
}
section#floating #btn-floatMenu[aria-expanded=true] {
    background-color: #fff !important;
    border-color: var(--avs-color-01) !important;
    border-width: 4px;
    color: var(--avs-color-01) !important;
}
section#floating:has(#btn-toTop.d-block) #floatMenu {
    bottom: calc(56px + 56px + 8px + 8px) !important;
}
section#floating:has(#btn-toTop.d-block) #btn-floatMenu {
    bottom: calc(56px + 8px) !important;
}

/* --- Footer --- */
footer {
    position: relative;
    background-color: var(--avs-color-03);
    color: white;
    font-family: "SukhumvitSet", serif;
    font-size: 14px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('/images/backgrounds/avs30yr.jpg');
}
footer a {
    color: white;
    cursor: pointer;
    text-decoration: none;
}
footer iframe {
    border-radius: 8px;
}
footer section:first-child {
    min-height: 40vh;
}
footer section:first-child .container {
    padding-bottom: 24px;
}
footer .social-links a {
    font-size: 16px;
    display: inline-block;
    background-color: rgba(255,255,255,.2);
    color: #fff;
    line-height: 1;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    transition: 0.3s all ease-in-out;
}
footer .social-links a[data-media="fb"]:hover  { background-color: #4267B2; }
footer .social-links a[data-media="x"]:hover   { background-color: #000000; }
footer .social-links a[data-media="line"]:hover { background-color: #06c755; }
footer .social-links a[data-media="yt"]:hover  { background-color: #FF0000; }
footer .social-links a[data-media="gmap"]:hover { background-color: #31a4b6; }
footer .social-links a[data-media="tel"]:hover { background-color: #9900ff; }
footer section:last-child {
    font-size: 16px;
}
footer section:last-child > .container {
    min-height: 74px;
    border-top: 1px solid #ffffff26;
}
footer section:last-child > .container > .row {
    min-height: 74px;
}
footer h4, footer h5 {
    font-family: "Kanit", sans-serif !important;
    color: white !important;
}
footer ul.ul-menu {
    list-style-type: none;
    margin: 0;
    padding: 6px 0 0 24px;
}
footer ul.ul-menu li {
    padding-bottom: 6px;
}
footer ul.ul-menu li a {
    letter-spacing: 1px;
    transition: 0.3s ease-in-out all;
    font-size: 16px;
}
footer ul.ul-menu li a:hover {
    color: var(--avs-color-03) !important;
}
footer ul.ul-menu li a .fa-pushed:before {
    content: "•";
}
footer::before {
    content: "";
    background: rgba(0,0,0,.8);
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* --- Search input --- */
div.input-group:has(>input[type="search"]),
input[type="search"],
input[type="search"] + #span-search {
    min-height: 24px;
    line-height: 14px;
    font-size: 14px;
    height: 24px;
}

/* --- Mobile overrides --- */
@media screen and (max-width: 787px) {
    div.input-group:has(>input[type="search"]),
    input[type="search"],
    input[type="search"] + #span-search {
        min-height: 18px;
        line-height: 12px;
        font-size: 12px;
        height: 18px;
    }
    header > div > .row { height: 30px; }
    header .div-social a { height: 16px; width: 16px; }
    .navbar-slider {
        height: 120vh !important;
        width: 0;
        position: fixed;
        z-index: 1;
        top: calc(0px - 30px - 8px);
        left: 0;
        background-color: whitesmoke;
        overflow-x: hidden;
        transition: 0.5s;
        padding-top: 60px;
        border-right: solid 4px var(--avs-color-04);
    }
    .navbar-slider.show { width: 80vw; }
    .nav-item {
        text-align: center;
        margin: 16px auto;
    }
    .nav-item .nav-link {
        font-size: 24px;
        font-weight: bold;
        padding: 8px 16px;
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
    background-color: #F5F5F5;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: #F5F5F5;
}
::-webkit-scrollbar-thumb {
    background-color: var(--avs-color-02);
}

/* --- Utility --- */
.form-floating > label { z-index: 0; }
button:is(:active,:focus) { background-color: inherit; }
.material-icons { font-size: 16px; vertical-align: middle; }

/* --- Buttons --- */
.btn-avs-01,
.btn-avs-01:hover {
    border-radius: 4px;
    background-color: var(--avs-color-01) !important;
    color: #fff !important;
    font-size: 16px;
}
.btn-avs-02,
.btn-avs-02:hover {
    border-radius: 4px;
    background-color: var(--avs-color-02) !important;
    color: #fff !important;
    font-size: 16px;
}
.btn-avs-outline-01,
.btn-avs-outline-01:hover {
    border-radius: 4px;
    background-color: transparent !important;
    color: var(--avs-color-01) !important;
    font-size: 16px;
}

/* --- Copy URL button --- */
button#btn-copy_url { transition: all 0.3s ease-in-out; }
button#btn-copy_url span { display: none; }
button#btn-copy_url.correct-animate span {
    display: inline-block;
    animation: correct_animation 0.6s;
}
@keyframes correct_animation {
    0%   { transform: scale(0.5) rotate(-5deg); }
    25%  { transform: rotate(5deg); }
    50%  { transform: rotate(-5deg); }
    75%  { transform: rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* --- Card Preview --- */
.card.card-preview {
    box-shadow: 0 2px 12px -8px #00000094;
    height: 100%;
    border-radius: 8px;
}
.card.card-preview * {
    transition: all 0.5s ease-out;
}
.card.card-preview .card-badge {
    position: absolute;
    z-index: 1;
    top: 4px;
    left: 4px;
}
.card.card-preview .card-badge img {
    width: 44px;
    filter: drop-shadow(1px 2px 1px hsla(0,0%,0%,.5));
}
.card.card-preview .card-header {
    overflow: hidden;
    position: relative;
    display: inline-block;
    background-color: #E0E0E0;
    border-radius: 4px;
    padding: 0;
}
.card.card-preview .card-header .card-image {
    position: relative;
    padding: 0;
    cursor: pointer;
    border-color: transparent;
    background-position: top;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: inset 0 -10px 12px -8px #00000066, inset 0 10px 12px -8px #00000066;
    border-radius: 4px;
    min-height: var(--avs-card-image-height);
}
.card.card-preview .card-header .card-image::before {
    content: "";
    display: none;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(52,73,94,.125);
    transition: all 0.5s ease-out;
    border-radius: 4px;
}
.card.card-preview .card-header .card-image::after {
    content: "";
    height: 24px;
    width: 100%;
    position: absolute;
    top: calc(50% - 12px);
    left: 0;
    transition: all 0.5s ease-out;
    color: #ffffff00;
}
.card.card-preview .card-header .card-text {
    position: absolute;
    bottom: 0;
    background-color: #00000066;
    color: white;
    width: 100%;
    border-radius: 0 0 4px 4px;
}
.card.card-preview .card-header .card-text p {
    margin: 0;
    padding: 4px 16px;
    font-size: 16px;
}
div:is(.act-last1,.act-last2):has(button:hover,b:hover) .card-image,
.card-preview:has(a.btn-alink:hover) .card-image,
.card-preview .card-header:hover .card-image {
    transform: scale(1.1);
}
.card-preview .card-header:hover .card-image::before,
.card-preview .card-header:focus .card-image::before {
    display: block;
}
.card-preview .card-header:hover .card-image::after,
.card-preview .card-header:focus .card-image::after {
    color: #ffffff;
    text-shadow: 0 0 2px #00000066;
}

/* --- Skeleton loading --- */
tr.sk-loading h1, tr.sk-loading h2, tr.sk-loading h3,
tr.sk-loading h4, tr.sk-loading h5, tr.sk-loading h6,
tr.sk-loading span, tr.sk-loading a {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: SKloading 10s infinite;
    display: inline-block;
    border-radius: 4px;
    width: 100%;
    height: 16px;
}
@keyframes SKloading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Pagination --- */
.pagination .navJs {
    box-shadow: none !important;
    background-color: transparent;
}
.pagination .navJs ul { flex-wrap: wrap; justify-content: end; }
.pagination .navJs li { border-radius: 8px !important; margin: 4px; }
.pagination .navJs a {
    border-radius: inherit !important;
    color: #333;
    border: 1px solid lightgrey;
}
.pagination .navJs .active {
    color: white !important;
    background-color: var(--avs-color-01) !important;
}

/* --- Share --- */
.div-share { flex-wrap: wrap; }
.div-share iframe { margin-left: 8px; }
.div-share a {
    height: 32px !important;
    width: 32px !important;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 50%;
    aspect-ratio: 1/1;
}
.div-share .line-it-button {
    height: 32px !important;
    width: 32px !important;
    margin-top: 1px !important;
    margin-left: 8px !important;
}
.div-share .btn-share {
    font-size: 12px;
    line-height: 12px;
    height: 32px;
    padding: 0;
    border-radius: 20px !important;
    color: #fff;
    background-color: #4CAF50;
    width: 86px;
}

/* --- Misc --- */
.tag-not-found {
    position: absolute;
    color: #6a6a6a;
    font-style: italic;
    letter-spacing: 1px;
    text-align: center;
    font-size: 12px;
    display: block;
    z-index: 1;
    user-select: none;
    border-radius: 12px;
    background-color: #ededed;
    padding: 2px 14px;
}
.fb_iframe_widget > span,
.fb_iframe_widget > span > iframe {
    width: 100% !important;
}

/* --- Responsive background images --- */
@media (max-width: 480px) {
    .rsp-bg { background-image: var(--bg-sm) !important; }
}
@media (min-width: 481px) and (max-width: 768px) {
    .rsp-bg { background-image: var(--bg-md) !important; }
}

/* --- Google Translate: suppress injected top banner & style widget --- */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }
#google_translate_element .goog-te-gadget { font-size: 0; }
#google_translate_element .goog-te-gadget > span { display: none; }
#google_translate_element .select2-container { min-width: 130px; display: block;}
#google_translate_element .select2-selection--single {
    height: 28px;
    border-color: #ccc;
    background: #fff;
    border-radius: 4px;
}
#google_translate_element .select2-selection__rendered {
    color: var(--avs-color-02);
    line-height: 26px;
    font-size: 13px;
}
#google_translate_element .select2-selection__arrow b {
    border-color: var(--avs-color-02) transparent transparent;
}
#google_translate_element .select2-selection__arrow { top: 2px; }
