/* LANGLR v3 - Voice Call, Translation, Subscription UI */

/* ==================== CALL UI ==================== */
#langlr-call-ui {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.call-peer-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.call-status {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 8px;
}

.call-timer {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    margin-bottom: 40px;
    color: #4CAF50;
}

.call-actions {
    display: flex;
    gap: 30px;
}

.call-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    color: #fff;
}

.call-btn:hover {
    transform: scale(1.1);
}

.call-answer {
    background: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

.call-hangup {
    background: #f44336;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.4);
}

/* Call button in chat header */
.btn-voice-call {
    background: none;
    border: none;
    color: #4CAF50;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-voice-call:hover {
    background: rgba(76, 175, 80, 0.1);
}

/* ==================== TRANSLATE ==================== */
.btn-translate {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-translate:hover {
    border-color: #e724a5;
    color: #e724a5;
}

.btn-translate.loading {
    opacity: 0.5;
    cursor: wait;
}

.btn-translate.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top-color: #e724a5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 4px;
}

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

.translation-result {
    background: #f0f8ff;
    border-left: 3px solid #2196F3;
    padding: 8px 12px;
    margin-top: 6px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.translation-result i {
    color: #2196F3;
    margin-right: 4px;
}

/* ==================== TYPING INDICATOR ==================== */
#typing-indicator {
    display: none;
    padding: 4px 12px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* ==================== ONLINE STATUS ==================== */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.online .online-dot { background: #4CAF50; }
.offline .online-dot { background: #ccc; }

/* ==================== SUBSCRIPTION / PRICING ==================== */
.pricing-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.pricing-header {
    text-align: center;
    margin-bottom: 40px;
}

.pricing-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.pricing-header p {
    color: #666;
    font-size: 16px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 640px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    border-color: #e724a5;
    box-shadow: 0 8px 30px rgba(231, 36, 165, 0.1);
}

.pricing-card.featured {
    border-color: #e724a5;
    background: linear-gradient(180deg, #fff5fb 0%, #fff 100%);
}

.pricing-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e724a5;
    color: #fff;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pricing-plan-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 42px;
    font-weight: 800;
    margin: 16px 0;
}

.pricing-price span {
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}

.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li i {
    color: #4CAF50;
    width: 16px;
}

.pricing-features li.disabled {
    color: #bbb;
}

.pricing-features li.disabled i {
    color: #ddd;
}

.btn-subscribe {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-subscribe-free {
    background: #f5f5f5;
    color: #333;
}

.btn-subscribe-free:hover {
    background: #eee;
}

.btn-subscribe-paid {
    background: #e724a5;
    color: #fff;
}

.btn-subscribe-paid:hover {
    background: #d11d95;
    box-shadow: 0 4px 16px rgba(231, 36, 165, 0.3);
}

/* ==================== TRANSLATION USAGE BADGE ==================== */
.translation-usage-badge {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 8px;
}

/* ==================== SUBSCRIPTION STATUS BANNER ==================== */
.subscription-banner {
    background: linear-gradient(90deg, #e724a5, #7c3aed);
    color: #fff;
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
}

.subscription-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

/* ==================== REGISTER PAGE ==================== */
.register-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.register-card {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.register-card h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.register-card .register-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0 0 28px;
}

/* Social Buttons */
.register-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-social-google {
    background: #fff;
    border: 2px solid #eee;
    color: #333;
}

.btn-social-google:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #333;
    text-decoration: none;
}

.btn-social-facebook {
    background: #1877F2;
    border: 2px solid #1877F2;
    color: #fff;
}

.btn-social-facebook:hover {
    background: #1565d8;
    border-color: #1565d8;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
    color: #fff;
    text-decoration: none;
}

.btn-social-register i {
    font-size: 18px;
}

.btn-social-google i {
    color: #4285f4;
}

.btn-social-line {
    background: #06C755;
    border: 2px solid #06C755;
    color: #fff;
}

.btn-social-line:hover {
    background: #05b54c;
    border-color: #05b54c;
    box-shadow: 0 2px 8px rgba(6, 199, 85, 0.3);
    color: #fff;
    text-decoration: none;
}

.btn-social-line .line-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314'/%3E%3C/svg%3E") no-repeat center/contain;
}

/* Divider */
.register-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 16px;
}

.register-divider::before,
.register-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.register-divider span {
    color: #999;
    font-size: 13px;
    white-space: nowrap;
}

/* Form */
.register-form .form-group {
    margin-bottom: 16px;
}

.register-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.register-form .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    outline: none;
}

.register-form .form-group input:focus {
    border-color: #e724a5;
}

.register-form .form-group input::placeholder {
    color: #bbb;
}

.register-form .form-error {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
}

.register-form .btn-register-submit {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #e724a5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 24px;
}

/* Override for step-buttons layout (prevent height mismatch) */
.register-form .step-buttons {
    display: flex !important;
    align-items: stretch !important;
}
.register-form .step-buttons .btn-register-submit {
    padding: 12px 24px;
    margin-top: 0;
    border: 2px solid #e724a5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.register-form .step-buttons .btn-step-back {
    border: 2px solid #eee;
    box-sizing: border-box;
    align-self: stretch;
}

.register-form .btn-register-submit:hover {
    background: #d11d95;
    box-shadow: 0 4px 16px rgba(231, 36, 165, 0.3);
}

/* Bottom Links */
.register-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.register-links a {
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.register-links a:hover {
    color: #e724a5;
}

.register-links span {
    color: #ddd;
    margin: 0 12px;
}

/* Mobile */
@media (max-width: 480px) {
    .register-card {
        padding: 32px 20px;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .register-section {
        padding: 20px 0;
    }
}

/* ==================== V3 POPUP MODAL (Fancybox) ==================== */
.v3-popup.modal-dialog {
    width: 420px;
}

.v3-popup .modal-content {
    border-radius: 16px;
    box-shadow: none;
    background: #fff;
}

.v3-popup .modal-header {
    display: none;
}

.v3-popup .modal-body {
    padding: 24px 28px 20px;
}

.v3-popup-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.v3-popup .register-subtitle {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin: 0 0 16px;
}

/* Override old social button styles inside v3-popup */
.v3-popup .register-social {
    margin-bottom: 0;
    gap: 8px;
}

.v3-popup .btn-social-register {
    background-image: none;
    padding: 11px 20px;
    font-size: 14px;
}

/* Override old form styles inside v3-popup */
.v3-popup .register-form .form-group {
    margin-bottom: 12px;
}

.v3-popup .register-form .form-group label {
    margin-bottom: 4px;
    font-size: 12px;
}

.v3-popup .register-form .form-group input[type="text"],
.v3-popup .register-form .form-group input[type="email"],
.v3-popup .register-form .form-group input[type="password"] {
    height: auto;
    line-height: normal;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 0;
}

.v3-popup .register-form .form-group input[type="text"]:focus,
.v3-popup .register-form .form-group input[type="email"]:focus,
.v3-popup .register-form .form-group input[type="password"]:focus {
    border-color: #e724a5;
    outline: none;
}

.v3-popup .register-form .btn-register-submit {
    background-image: none;
    height: auto;
    line-height: normal;
    margin-top: 16px;
    padding: 12px 20px;
    font-size: 15px;
}

.v3-popup .register-divider {
    margin: 16px 0;
}

/* Checkbox */
.v3-popup .v3-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    font-weight: 400;
}

.v3-popup .v3-checkbox input[type="checkbox"] {
    width: auto;
    padding: 0;
    border: none;
}

/* Bottom links compact */
.v3-popup .register-links {
    margin-top: 16px;
    padding-top: 14px;
}

/* Fancybox skin override for v3 popup */
.fancybox-wrap .fancybox-skin:has(.v3-popup) {
    border-radius: 16px;
    padding: 0 !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Fancybox close button - minimal × only (Pattern A) */
.fancybox-wrap .fancybox-close {
    width: 24px;
    height: 24px;
    right: 14px;
    top: 12px;
    background: none !important;
    border-radius: 0;
    transition: opacity 0.2s;
}
.fancybox-wrap .fancybox-close:hover {
    opacity: 0.5;
}
.fancybox-wrap .fancybox-close::before,
.fancybox-wrap .fancybox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1.5px;
    background: #aaa;
    border-radius: 1px;
}
.fancybox-wrap .fancybox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.fancybox-wrap .fancybox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Error display inside v3-popup */
.v3-popup div[id^="validation-errors"] {
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

/* Mobile */
@media (max-width: 480px) {
    .v3-popup.modal-dialog {
        width: 100%;
        max-width: 360px;
    }

    .v3-popup .modal-body {
        padding: 20px 16px 16px;
    }
}
