﻿:root {
    --kosmos-lc-primary: #25D366;
    --kosmos-lc-primary-hover: #1ebd5a;
    --kosmos-lc-text: #2c3e50;
    --kosmos-lc-text-muted: #666666;
    --kosmos-lc-border: #dcdfe6;
    --kosmos-lc-focus-ring: rgba(37, 211, 102, 0.25);
    --kosmos-lc-bg-card: #ffffff;
    --kosmos-lc-radius: 12px;
    --kosmos-lc-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Overlay */
.kosmos-lc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 16px;
    box-sizing: border-box;
}

.kosmos-lc-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.kosmos-lc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Modal Box */
.kosmos-lc-modal-container {
    position: relative;
    background: var(--kosmos-lc-bg-card);
    width: 100%;
    max-width: 460px;
    border-radius: var(--kosmos-lc-radius);
    padding: 32px 28px 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    z-index: 2;
}

.kosmos-lc-modal.is-active .kosmos-lc-modal-container {
    transform: translateY(0) scale(1);
}

/* Close Button */
.kosmos-lc-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--kosmos-lc-transition);
}

.kosmos-lc-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Header */
.kosmos-lc-modal-header {
    text-align: center;
    margin-bottom: 22px;
}

.kosmos-lc-badge-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    background: #e6f9ed;
    color: var(--kosmos-lc-primary);
    border-radius: 50%;
    margin-bottom: 12px;
}

.kosmos-lc-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--kosmos-lc-text);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.kosmos-lc-subtitle {
    font-size: 14px;
    color: var(--kosmos-lc-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Inline Container */
.kosmos-lc-inline-container {
    background: var(--kosmos-lc-bg-card);
    border-radius: var(--kosmos-lc-radius);
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid #edf2f7;
    box-sizing: border-box;
    max-width: 500px;
    margin: 0 auto;
}

/* Form Styles */
.kosmos-lc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kosmos-lc-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.kosmos-lc-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.kosmos-lc-field-group label .required {
    color: #ef4444;
}

.kosmos-lc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.kosmos-lc-input-icon {
    position: absolute;
    left: 12px;
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
}

.kosmos-lc-input-wrapper input {
    width: 100% !important;
    height: 46px !important;
    padding: 0 14px 0 38px !important;
    background: #f8fafc !important;
    border: 1.5px solid var(--kosmos-lc-border) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    transition: var(--kosmos-lc-transition) !important;
    box-sizing: border-box !important;
}

.kosmos-lc-input-wrapper input:focus {
    background: #ffffff !important;
    border-color: var(--kosmos-lc-primary) !important;
    box-shadow: 0 0 0 3px var(--kosmos-lc-focus-ring) !important;
    outline: none !important;
}

.kosmos-lc-input-wrapper input.has-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Submit Button */
.kosmos-lc-submit-btn {
    position: relative;
    width: 100%;
    height: 48px;
    background: var(--kosmos-lc-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35) !important;
    transition: var(--kosmos-lc-transition) !important;
    margin-top: 6px;
}

.kosmos-lc-submit-btn:hover {
    background: var(--kosmos-lc-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45) !important;
}

.kosmos-lc-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner inside button */
.kosmos-lc-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: kosmos-lc-spin 0.8s linear infinite;
}

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

/* Feedback message */
.kosmos-lc-feedback {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.kosmos-lc-feedback.is-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.kosmos-lc-feedback.is-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Privacy Note */
.kosmos-lc-privacy {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin: 4px 0 0 0;
}

/* Floating WhatsApp Button */
.kosmos-lc-floating-btn {
    position: fixed;
    bottom: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 12px;
    background: var(--kosmos-lc-primary);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.kosmos-lc-floating-btn.pos-bottom-right {
    right: 24px;
}

.kosmos-lc-floating-btn.pos-bottom-left {
    left: 24px;
}

.kosmos-lc-floating-btn:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
}

.kosmos-lc-floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .kosmos-lc-modal-container {
        padding: 24px 20px 20px;
        max-width: 95%;
    }

    .kosmos-lc-floating-btn {
        bottom: 18px;
        padding: 10px;
    }
    .kosmos-lc-floating-btn.pos-bottom-right {
        right: 18px;
    }
    .kosmos-lc-floating-btn.pos-bottom-left {
        left: 18px;
    }
    .kosmos-lc-floating-text {
        display: none;
    }
}