/* Honeypot fields - hide from users */
.hs_my_name_wrapper,
.hs_my_time_wrapper,
input[name*="my_name"],
input[name*="my_time"] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-weight: 500;
    animation: fadeIn 0.5s ease-in-out;
}

.alert-success {
    background-color: #e6ffed;
    border: 1px solid #34d399;
    color: #065f46;
}

.alert-error {
    background-color: #ffe6e6;
    border: 1px solid #f87171;
    color: #7f1d1d;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.captcha-wrapper .btn-refresh {
    width: 45px;
    height: 45px;
    max-width: 55px;
    padding: 0;
}
.captcha-input-wrapper {
    width: 210px;
}

/* Alpine.js form styles */
.form__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form__error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s ease-in-out;
}

.form__input--error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626 !important;
}

/* Override the _form-valid styles when using Alpine.js */
.form__input:not(.form__input--error) {
    border-color: #e7e7e7 !important;
    box-shadow: none !important;
}

/* Ensure textarea also follows the same rules */
.form__input:not(.form__input--error):is(textarea) {
    border-color: #e7e7e7 !important;
    box-shadow: none !important;
}

/* Handle focus states properly */
.form__input:not(.form__input--error):focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 1px var(--primary) !important;
}

/* Additional spacing for form items with errors */
.form__item:has(.form__error) {
    margin-bottom: 0.75rem;
}

/* Alternative for browsers that don't support :has() */
.form__item .form__error + * {
    margin-top: 0.5rem;
}

/* File input styling */
.form__input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #e7e7e7;
    background-color: #fafafa;
    cursor: pointer;
}

/* Login form home link styling */
.login-home-link {
    color: #6c757d;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.login-home-link:hover {
    color: #495057;
    text-decoration: none;
}

.login-home-link i {
    margin-right: 0.5rem;
}

.form__input[type="file"]:hover {
    border-color: var(--primary);
    background-color: #f0f9ff;
}

.form__input[type="file"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
    background-color: #f0f9ff;
}

.form__input[type="file"]::file-selector-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    margin-right: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.form__input[type="file"]::file-selector-button:hover {
    background-color: var(--primary-dark, #1e40af);
}

/* reCAPTCHA styles */
.recaptcha-wrapper {
    margin-bottom: 15px;
}

.recaptcha-wrapper .g-recaptcha {
    display: inline-block;
}

/* Captcha loader animation */
.captcha-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 8px;
}

.captcha-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Alpine.js x-cloak */
[x-cloak] {
    display: none !important;
}

/* Alpine.js consultation form styles */
.popup .error-text {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.popup .form__input.error,
.popup select.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626 !important;
}

.popup .error-message {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.popup .success-message {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.popup .form__button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.popup .form__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading spinner for form button */
.popup .form__button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(253, 94, 81, 0.3);
}

.scroll-to-top[x-show="true"] {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #e54d42;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(253, 94, 81, 0.4);
}

.scroll-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

.form-search__block [type="text"],
.form-search__block [type="number"] {
    height: 50px;
    border: none;
    border-radius: 150px;
}

/* Remove number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mod-id {
    max-width: 100px;
}

/* Mobile border for user_id field */
@media (max-width: 47.99875em) {
    .mod-id {
        max-width: 100%;
    }
    .form-search__block input[name="user_id"] {
        border: 1px solid #f8f8f8;
        height: 44px;
    }
}

@media (min-width: 48em) {
    .invisible-lg {
        display: none;
    }
}

/* Header phone styling */
.phone-header {
    display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: auto;
        margin-right: 20px;
        margin-bottom: 0;
        padding: 8px 18px;
        background-color: transparent;
        border: 1px solid rgba(253, 94, 81, 0.3);
        border-radius: 20px;
    transition: all 0.3s ease;
}

.phone-header:hover {
    background-color: transparent;
    border-color: rgba(253, 94, 81, 0.5);
}

.phone-header__flag {
    font-size: 18px;
    line-height: 1;
}

.phone-header__number {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.phone-header__number:hover {
    color: #e54d42;
    text-decoration: none;
}

@media (max-width: 768px) {
    .phone-header {
        margin-right: 10px;
        margin-bottom: 8px;
        padding: 10px 15px;
        gap: 6px;
        width: 100%;
    }

    .phone-header__flag {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .phone-header {
        margin-right: 5px;
        margin-bottom: 6px;
        padding: 12px 12px;
        gap: 4px;
    }

    .phone-header__flag {
        font-size: 14px;
    }
}

/* Main page phone styling - mobile only */
.main-phone {
    display: none;
}

/* Hide social icons on desktop */
.main-social {
    display: none;
}

@media (max-width: 768px) {
    .header__right {
        flex-wrap: wrap;
    }
    .main__link.btn-accent {
        width: 100%;
    }
    .main-phone {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 12px 20px;
        background-color: transparent;
        border: none;
        border-radius: 25px;
        margin: 20px 0;
    }

    .main-phone__flag {
        font-size: 20px;
        line-height: 1;
    }

    .main-phone__number {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
        transition: color 0.3s ease;
    }

    .main-phone__number:hover {
        color: #e54d42;
        text-decoration: none;
    }

    /* Social icons styling for mobile - separate row above phone */
    .main-social {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        margin-bottom: 12px;
    }

    .main-social__link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        transition: transform 0.2s ease;
    }

    .main-social__link:hover {
        transform: scale(1.1);
    }

    .main-social__link._icon-telegram {
        color: #039be5;
        font-size: 32px; /* Увеличиваем размер иконки Telegram */
    }

    .main-social__link._icon-whatsapp {
        color: #25d366;
    }
}

@media (max-width: 480px) {
    .main-phone {
        padding: 10px 15px;
        gap: 8px;
        margin: 15px 0;
    }

    .main-phone__flag {
        font-size: 18px;
    }

    .main-phone__number {
        font-size: 14px;
    }

    .main-social {
        gap: 14px;
        margin-bottom: 10px;
    }

    .main-social__link {
        width: 26px;
        height: 26px;
    }

    .main-social__link._icon-telegram {
        font-size: 21px;
    }
}

/* Testimonial "See More" button and modal styles */
.tabs__avatar-wrapper {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 8px;
    width: 102px;
    align-items: stretch;
}

.testimonial-see-more-btn {
    width: 100%;
    padding: 10px 12px;
    background-color: #fd5e51;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.testimonial-see-more-btn:hover {
    background-color: #e54d42;
    transform: translateY(-1px);
}

.testimonial-see-more-btn:active {
    transform: translateY(0);
}

/* Testimonial photos modal */
.testimonial-photos-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.testimonial-photos-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.testimonial-photos-modal__content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.testimonial-photos-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.testimonial-photos-modal__close:hover {
    background-color: #fff;
    transform: scale(1.1);
}

.testimonial-photos-modal__gallery {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
}

.testimonial-photos-modal__gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    object-fit: contain;
}

.tabs__ava {
    width: 102px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tabs__ava img {
    width: 100%;
    height: 102px;
    object-fit: cover;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .tabs__row {
        display: flex;

        flex-direction: column;
    }
    .tabs__ava {
        width: 146px;
    }
    .tabs__ava img {
        width: 100%;
        height: 100%;
        aspect-ratio: 4 / 4;
    }
    .tabs__avatar-wrapper {
        gap: 6px;
        width: 100%;
    }
    .tabs__item {
        flex-direction: column;
        gap: 20px;
    }
    .tabs__avatar-wrapper {
        gap: 6px;
        width: 58px;
    }

    .testimonial-see-more-btn {
        padding: 8px 10px;
        font-size: 11px;
    }

    .testimonial-photos-modal__content {
        padding: 20px 10px;
    }

    .testimonial-photos-modal__close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .testimonial-photos-modal__gallery {
        gap: 15px;
        padding: 15px;
        max-height: 85vh;
    }
}

/* Subscription toggle switch */
.subscription-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.subscription-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.subscription-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.subscription-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.subscription-toggle input:checked + .subscription-toggle-slider {
    background-color: #fd5e51;
}

.subscription-toggle input:checked + .subscription-toggle-slider:before {
    transform: translateX(24px);
}

.subscription-toggle input:disabled + .subscription-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spacing between subscription name and toggle */
.subscription-item {
    gap: 20px;
}

/* Icon mail for subscriptions menu - ensure it displays correctly */
.side__inner._icon-mail::before {
    font-size: 19px !important;
    content: "\e90a" !important;
}

@media (max-width: 47.99875em) {
    .side__inner._icon-mail::before {
        font-size: 16px !important;
    }
}
