/**
 * VK ID Auth Form Styles
 * Site: raspilim.com (s2)
 * Colors: #00BCD4 (main), #0097A7 (dark), #B2EBF2 (light)
 */

/* ============================================
   AUTH PAGE - NEW DESIGN
   ============================================ */

/* Auth page wrapper */
.auth-page.pk-page .auth_wrapp {
    max-width: 420px;
    margin: 0 auto;
    padding: 0;
}

/* Заголовок "Личный кабинет" — по центру */
.auth-page h2,
.auth-page.pk-page h2,
.auth-page.pk-page .auth_wrapp h2,
.auth_wrapp h2,
body .auth-page h2,
body.auth-page h2 {
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 24px !important;
    display: block !important;
}

/* Form container */
.auth-page.pk-page .auth_wrapp .form {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 188, 212, 0.08);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

/* Header with logo */
.auth-form-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-form-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.auth-form-logo img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.auth-form-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.auth-form-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Benefits row */
.auth-benefits {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    padding: 16px;
    background: linear-gradient(135deg, #E0F7FA, #B2EBF2);
    border-radius: 12px;
}

.auth-benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-benefit-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.15);
}

.auth-benefit-icon svg {
    width: 22px;
    height: 22px;
    color: #00BCD4;
}

.auth-benefit-text {
    font-size: 11px;
    color: #0097A7;
    font-weight: 500;
    max-width: 70px;
    line-height: 1.3;
}

/* Form inputs */
.auth-page.pk-page .form-control input[type="text"],
.auth-page.pk-page .form-control input[type="password"],
.auth-page.pk-page .form-control input[type="email"],
.auth-page.pk-page .form-control input[type="tel"] {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    transition: all 0.25s ease;
    background: #fafafa;
}

.auth-page.pk-page .form-control input:focus {
    border-color: #00BCD4;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.1);
    outline: none;
}

.auth-page.pk-page .form-control label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

/* Remember me and forgot password row */
.auth-page.pk-page .form_footer .filter.block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-page.pk-page .form_footer .remember label {
    font-size: 13px;
    color: #666;
}

.auth-page.pk-page .form_footer .forgot {
    font-size: 13px;
    color: #00BCD4;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-page.pk-page .form_footer .forgot:hover {
    color: #0097A7;
    text-decoration: underline;
}

/* Submit button */
.auth-page.pk-page .btn.btn-default.btn-lg {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

.auth-page.pk-page .btn.btn-default.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 188, 212, 0.4);
}

.auth-page.pk-page .btn.btn-default.btn-lg:active {
    transform: translateY(0);
}

/* Кнопка Регистрация — ОДИНАКОВАЯ ШИРИНА С ВОЙТИ */
/* Усиленные селекторы для переопределения Aspro */
a.btn.register,
a.btn.btn-transparent-border-color.register,
.auth-page a.btn.register,
.auth-page .btn.btn-transparent-border-color.register,
.auth-page.pk-page .btn.register,
.auth-page.pk-page a.btn.btn-transparent-border-color.btn-lg.register,
body .auth-page a.register.btn {
    background: transparent !important;
    border: 2px solid #00BCD4 !important;
    color: #00BCD4 !important;
    margin-top: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: block !important;
    text-align: center !important;
    border-radius: 12px !important;
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
}

a.btn.register:hover,
.auth-page a.btn.register:hover,
.btn.btn-transparent-border-color.register:hover {
    background: rgba(0, 188, 212, 0.1) !important;
    transform: translateY(-2px);
    color: #00BCD4 !important;
}

/* Контейнер кнопок — вертикальный стек */
.auth-page .buttons,
.auth-page.pk-page .buttons,
.auth-page .form_footer .buttons,
.auth-page.pk-page .buttons .line-block__item.width100,
.form_footer .buttons .line-block__item.width100 {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    align-items: stretch !important;
}

/* Убираем pull-right у кнопки Регистрация */
.auth-page .buttons .pull-right,
.auth-page.pk-page .buttons .pull-right,
.form_footer .buttons .pull-right,
a.btn.register.pull-right {
    float: none !important;
    position: static !important;
}

/* ============================================
   SOCIAL AUTH SECTION - VK ID & YANDEX
   ============================================ */

.auth-social-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #eee;
}

/* Divider "or login via" */
.auth-social-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-social-divider-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.auth-social-divider-text {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

/* Social buttons container */
.auth-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Social button base styles */
.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    width: 100%;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.auth-social-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.auth-social-btn:active {
    transform: translateY(0);
}

/* Icon container */
.auth-social-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
}

.auth-social-btn-icon svg {
    width: 22px;
    height: 22px;
}

/* Text container */
.auth-social-btn-text {
    text-align: left;
}

.auth-social-btn-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.auth-social-btn-desc {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
    line-height: 1.3;
}

/* VK ID Button */
.auth-social-btn-vk {
    background: linear-gradient(135deg, #0088ff, #0077FF);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 119, 255, 0.25);
}

.auth-social-btn-vk:hover {
    box-shadow: 0 6px 16px rgba(0, 119, 255, 0.35);
    color: #fff;
}

/* VK button pulse animation */
.auth-social-btn-vk::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transform: translate(-50%, -50%) scale(0);
    animation: vk-pulse 3s ease-out infinite;
}

@keyframes vk-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Yandex Button */
.auth-social-btn-yandex {
    background: linear-gradient(135deg, #1a1a1a, #000);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-social-btn-yandex:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.auth-social-btn-yandex .auth-social-btn-icon {
    background: #FC3F1D;
}

/* Буква Я для иконки Яндекса */
.yandex-ya-letter {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    font-family: Arial, sans-serif;
    line-height: 1;
}

/* Yandex button pulse animation */
.auth-social-btn-yandex::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(252, 63, 29, 0.1);
    border-radius: 12px;
    transform: translate(-50%, -50%) scale(0);
    animation: yandex-pulse 3s ease-out infinite;
    animation-delay: 1.5s;
}

@keyframes yandex-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Security badge */
.auth-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

.auth-security-badge svg {
    width: 18px;
    height: 18px;
    color: #4CAF50;
}

.auth-security-badge-text {
    font-size: 12px;
    color: #666;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .auth-page.pk-page .auth_wrapp .form {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .auth-benefits {
        gap: 12px;
        padding: 12px;
    }

    .auth-benefit-icon {
        width: 36px;
        height: 36px;
    }

    .auth-benefit-text {
        font-size: 10px;
    }

    .auth-social-btn {
        padding: 12px 16px;
    }

    .auth-social-btn-icon {
        width: 32px;
        height: 32px;
    }

    .auth-social-btn-title {
        font-size: 14px;
    }

    .auth-social-btn-desc {
        font-size: 11px;
    }
}

/* ============================================
   HIDE OLD SOCSERV BLOCK WHEN NEW IS ACTIVE
   ============================================ */

.auth-page.pk-page .social_block.old-socserv {
    display: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.auth-page.pk-page .auth_wrapp .form {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-social-btn {
    animation: fadeIn 0.3s ease-out;
    animation-fill-mode: both;
}

.auth-social-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.auth-social-btn:nth-child(2) {
    animation-delay: 0.2s;
}

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