/**
 * Elieve Beauty & Wellness — custom frontend styles.
 * Global stylesheet for behaviour not covered by the theme's style.css
 * (form submit loaders, etc.). No inline/internal CSS anywhere in the views.
 */

/* ============ Equal-height cards & text clamping ============ */
/* Truncates to a fixed number of lines so every card lines up,
   whatever length the admin enters. */
.text-clamp-2,
.text-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.text-clamp-2 { -webkit-line-clamp: 2; }
.text-clamp-3 { -webkit-line-clamp: 3; }

/* Blog cards (home page slider): equal height, footer link aligned bottom */
.bloging .vs-blog {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}
.bloging .slick-track { display: flex !important; }
.bloging .slick-slide { height: auto !important; }
.bloging .slick-slide > div { height: 100%; }
.bloging .vs-blog .blog-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.bloging .vs-blog .blog-title { min-height: 2.6em; }
.bloging .vs-blog .blog-content > p { min-height: 4.5em; margin-bottom: 14px; }
.bloging .vs-blog .link-btn { margin-top: auto; }

/* Keep thumbnails a uniform shape across cards */
.bloging .vs-blog .blog-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}
@media (max-width: 767.98px) {
    .bloging .vs-blog .blog-image img { height: 200px; }
}

/* ============ Submit button loading state ============ */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: .85;
}
.btn-loading .btn-label { visibility: hidden; }
.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: elieve-spin .7s linear infinite;
}
/* Light buttons (white/outline) need a dark spinner to stay visible */
.btn-loading.style7::after,
.btn-loading.btn-light::after {
    border-color: rgba(179, 141, 92, .35);
    border-top-color: #B38D5C;
}

@keyframes elieve-spin {
    to { transform: rotate(360deg); }
}

/* ============ Full-page submit overlay ============ */
.form-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 29, 19, .55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}
.form-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}
.form-loading-overlay .loader-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 34px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    max-width: 88vw;
}
.form-loading-overlay .loader-ring {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border: 3px solid #f0e6d2;
    border-top-color: #B38D5C;
    border-radius: 50%;
    animation: elieve-spin .8s linear infinite;
}
.form-loading-overlay .loader-text {
    font-family: 'Marcellus', serif;
    font-size: 16px;
    color: #1e1e2a;
    margin: 0;
}
.form-loading-overlay .loader-sub {
    font-size: 13px;
    color: #8a7c67;
    margin: 4px 0 0;
}

/* Reduced-motion users get a static indicator instead of spinning */
@media (prefers-reduced-motion: reduce) {
    .btn-loading::after,
    .form-loading-overlay .loader-ring {
        animation: none;
    }
}
