/* Giriş sayfası — sekme, kayıt formu ve doğrulama stilleri */

.lcc-form-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    transition:
        max-width 0.6s cubic-bezier(0.34, 1.25, 0.64, 1),
        transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1),
        opacity 0.4s ease;
}

@media (min-width: 900px) {
    .lcc-form-wrapper.is-register {
        max-width: 720px;
        transform: translateX(4px);
    }
}

@media (min-width: 1200px) {
    .lcc-form-wrapper.is-register {
        max-width: 780px;
        transform: translateX(6px);
    }
}

/* Segmented tab kontrolü */
.login-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #ecfdf5, #f0fdfa);
    border-radius: 14px;
    border: 1px solid #99f6e4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tab-btn {
    flex: 1;
    min-height: 44px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #5b7c78;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.tab-btn:hover {
    color: #134e4a;
}

.tab-btn:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

.tab-btn.active {
    color: #042f2e;
    background: #fff;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
}

.tab-btn {
    position: relative;
    overflow: hidden;
}

.tab-btn::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    transition: width 0.3s ease, left 0.3s ease;
}

.tab-btn.active::after {
    width: 60%;
    left: 20%;
}

/* Sekme panel geçişleri */
.tab-panels {
    position: relative;
    min-height: 420px;
}

.tab-panels--animating {
    overflow: hidden;
}

.tab-content {
    display: none;
    transform-origin: center top;
}

.tab-content.active {
    display: block;
    position: relative;
    z-index: 2;
}

.tab-content.tab-slide-out-left,
.tab-content.tab-slide-out-right {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 3;
    pointer-events: none;
}

.tab-content.tab-slide-out-left {
    animation: tabSlideOutLeft 0.45s cubic-bezier(0.6, 0, 0.9, 0.4) forwards;
}

.tab-content.tab-slide-out-right {
    animation: tabSlideOutRight 0.45s cubic-bezier(0.6, 0, 0.9, 0.4) forwards;
}

.tab-content.tab-slide-in-left {
    animation: tabSlideInLeft 0.58s cubic-bezier(0.22, 1.15, 0.36, 1) forwards;
}

.tab-content.tab-slide-in-right {
    animation: tabSlideInRight 0.58s cubic-bezier(0.22, 1.15, 0.36, 1) forwards;
}

@keyframes tabSlideOutLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-24px);
    }
}

@keyframes tabSlideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(24px);
    }
}

@keyframes tabSlideInLeft {
    0% {
        transform: translateX(-48px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes tabSlideInRight {
    0% {
        transform: translateX(48px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-tabs.tab-switching {
    animation: tabsWiggle 0.55s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.login-page.scene-register .login-tabs.tab-switching {
    animation: tabsExpand 0.55s cubic-bezier(0.34, 1.3, 0.64, 1);
}

@keyframes tabsWiggle {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.03) rotate(-0.5deg); }
    55% { transform: scale(0.98) rotate(0.5deg); }
}

@keyframes tabsExpand {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.04); box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2); }
}

.tab-panels--register .register-section {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tab-panels--register .register-section:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

/* Yalnızca giriş sekmesi içerik animasyonu (kayıtta çift yenileme olmasın) */
#tab-login.tab-slide-in-left .lprf_title,
#tab-login.tab-slide-in-left .lprf_subtitle,
#tab-login.tab-slide-in-right .lprf_title,
#tab-login.tab-slide-in-right .lprf_subtitle {
    animation: none;
}

#tab-login.active .auth-google-card {
    animation: cardGlow 4s ease-in-out infinite;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tab-content.active,
    .tab-content.tab-slide-in-left,
    .tab-content.tab-slide-in-right,
    .tab-content.tab-slide-out-left,
    .tab-content.tab-slide-out-right,
    .lcc-form-wrapper.is-register,
    .login-page .lp-wrapper.lp-wrapper--register {
        animation: none !important;
        filter: none !important;
        transform: none !important;
        transition: none !important;
    }

    .food-float {
        animation: none !important;
        opacity: 0.3 !important;
    }
}

.lcc-form-wrapper .lcc-form {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Kayıt formu bölümleri */
.register-section {
    margin-bottom: 20px;
    padding: 16px 14px 6px;
    background: #f8fffe;
    border: 1px solid #d1fae5;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.register-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.08), transparent);
    animation: sectionShine 4s ease-in-out infinite;
    pointer-events: none;
}

.register-form__col--left .register-section::before { animation-delay: 0s; }
.register-form__col--right .register-section::before { animation-delay: -2s; }

@keyframes sectionShine {
    0%, 100% { left: -100%; }
    50% { left: 120%; }
}

.register-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f766e;
}

.register-section__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Kayıt — 2 sütun düzen (masaüstü) */
.register-form__header {
    text-align: center;
    margin-bottom: 4px;
}

.register-form__header .lprf_subtitle {
    margin-bottom: 12px;
}

.register-form__top {
    margin-bottom: 16px;
}

.register-form__grid {
    display: block;
}

@media (min-width: 900px) {
    .register-form__grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 20px;
        align-items: start;
    }

    .register-form__col--left,
    .register-form__col--right {
        min-width: 0;
    }

    .register-form__col--right {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .register-form__col--right .register-section {
        margin-bottom: 12px;
        flex: 1;
    }

    .register-form__col--right .register-row--stack {
        flex-direction: column;
        gap: 0;
    }

    .register-form__col--right .register-row--stack .register-col {
        margin-bottom: 14px;
    }

    .register-form__actions {
        margin-top: 4px;
    }
}

.register-form__actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.register-form .lprf_subtitle {
    margin-bottom: 12px;
}

.register-terms {
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #fff;
    border: 1px dashed #a7f3d0;
    border-radius: 12px;
}

.register-terms .form-check-label {
    line-height: 1.45;
}

#registerForm .btn-main {
    margin-top: 4px;
}

/* Kayıt — iki sütun */
.register-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.register-col {
    flex: 1;
    min-width: 0;
}

#registerForm .form-group {
    margin-bottom: 14px;
}

#registerForm #emailVerificationGroup {
    margin-bottom: 10px;
}

/* E-posta doğrulama */
.email-input-wrapper {
    position: relative;
}

.email-input-wrapper .form-control {
    padding-right: 44px;
}

.email-status-icon {
    display: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 2;
}

.email-status-icon.is-valid::after,
.email-status-icon.is-invalid::after {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.email-status-icon.is-valid::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23059669'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E");
}

.email-status-icon.is-invalid::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc2626'%3E%3Cpath d='M18.3 5.7 12 12l6.3 6.3-1.4 1.4L10.6 13.4 4.3 19.7 2.9 18.3 9.2 12 2.9 5.7 4.3 4.3 10.6 10.6 16.9 4.3z'/%3E%3C/svg%3E");
}

.email-valid {
    border-color: #059669 !important;
    background: #f0fdf4 !important;
}

.email-invalid {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
}

#emailError {
    display: none;
    margin-top: 6px;
}

#codeTimer {
    display: none;
}

#btnSendCode {
    display: none;
    width: 100%;
    margin-top: 8px;
}

#btnSendCode .btn-icon {
    margin-right: 6px;
    vertical-align: -2px;
}

#emailVerificationGroup {
    display: none;
}

#emailVerificationGroup .d-flex {
    align-items: stretch;
    gap: 10px;
}

#emailVerificationGroup .form-control {
    flex: 1;
    min-width: 0;
}

#emailVerificationGroup .btn-secondary {
    flex-shrink: 0;
}

/* Kayıt alt link */
.register-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #d1fae5;
    text-align: center;
    font-size: 0.875rem;
    color: #5b7c78;
}

@media (max-width: 520px) {
    .register-row {
        flex-direction: column;
        gap: 0;
    }

    .lcc-form-wrapper {
        max-width: 100%;
    }
}
