/* =========================================
   SanalPos.com — Popup & Slide-In Styles
   ========================================= */

/* --- Exit Intent Overlay --- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.popup-overlay.show {
    opacity: 1;
}

/* --- Exit Intent Modal Box --- */
.popup-modal {
    background: #fff;
    max-width: 420px;
    width: 100%;
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.popup-overlay.show .popup-modal {
    transform: scale(1);
}

/* --- Close Button (X) --- */
.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #6C757D;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.popup-close:hover {
    background: #f8f9fa;
    color: #212529;
}

/* --- Icon Circle --- */
.popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 191, 165, 0.1);
    color: #00bfa5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

.popup-icon--success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ECC71;
}

/* --- Typography --- */
.popup-title {
    color: #212529;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.popup-subtitle {
    color: #6C757D;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* --- Form Fields --- */
.popup-field {
    margin-bottom: 0.75rem;
    text-align: left;
}

.popup-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e4ebf0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: #212529;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.popup-input:focus {
    border-color: #00bfa5;
    box-shadow: 0 0 0 3px rgba(0, 191, 165, 0.15);
}

.popup-input.field-error {
    border-color: #E74C3C;
}

.popup-input.field-error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.popup-field-error {
    display: block;
    color: #E74C3C;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    min-height: 1.1em;
}

/* --- Submit Button --- */
.popup-submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: #00bfa5;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
    margin-top: 0.25rem;
}

.popup-submit-btn:hover {
    background: #00a892;
}

.popup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- Notes --- */
.popup-note {
    color: #6C757D;
    font-size: 0.8rem;
    margin: 0.75rem 0 0.5rem;
    font-style: italic;
}

.popup-kvkk {
    font-size: 0.75rem;
    color: #6C757D;
    margin-bottom: 0;
}

.popup-kvkk i {
    color: #004a99;
    margin-right: 0.25rem;
}

.popup-kvkk a {
    color: #004a99;
    text-decoration: underline;
}

/* --- Success Close Button --- */
.popup-close-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: #00bfa5;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
}

.popup-close-btn:hover {
    background: #00a892;
}

/* =========================================
   Scroll Slide-In
   ========================================= */

.slide-in-box {
    position: fixed;
    bottom: 100px;
    left: 20px;
    z-index: 998;
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    max-width: 300px;
    width: calc(100% - 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.slide-in-box.show {
    transform: translateX(0);
    opacity: 1;
}

.slide-in-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    color: #6C757D;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.slide-in-close:hover {
    background: #f8f9fa;
    color: #212529;
}

.slide-in-title {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
    margin: 0 0 0.75rem;
    padding-right: 1.5rem;
}

.slide-in-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slide-in-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.slide-in-btn:hover {
    opacity: 0.9;
}

.slide-in-btn--call {
    background: #004a99;
    color: #fff;
}

.slide-in-btn--call:hover {
    color: #fff;
}

.slide-in-btn--cta {
    background: #00bfa5;
    color: #fff;
}

.slide-in-btn--cta:hover {
    color: #fff;
}

/* =========================================
   Sales Timed Slide-In (Sol Alt)
   ========================================= */

.sales-slide-in {
    position: fixed;
    bottom: 0;
    right: 20px;
    z-index: 999;
    width: 320px;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.sales-slide-in.show,
.sales-slide-in.minimized {
    transform: translateY(0);
}

/* --- Sekme handle --- */
.ss-tab {
    background: linear-gradient(135deg, #004a99, #0062cc);
    color: #fff;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s;
}

.ss-tab:hover {
    filter: brightness(1.1);
}

.ss-tab > i:first-child {
    font-size: 1rem;
    opacity: 0.9;
}

.ss-tab > span {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ss-chevron {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.sales-slide-in.show .ss-chevron {
    transform: rotate(180deg);
}

/* --- Form gövdesi --- */
.ss-body {
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12), 4px 0 24px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    max-height: 620px;
    transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.sales-slide-in.minimized .ss-body {
    max-height: 0;
}

/* --- Küçült butonu --- */
.ss-minimize {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border: none;
    background: #f0f4f8;
    color: #6c757d;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
    z-index: 1;
}

.ss-minimize:hover {
    background: #e2e8f0;
    color: #212529;
}

/* --- Başlık alanı --- */
.ss-head {
    padding: 1rem 1.25rem 0.625rem;
    padding-right: 2.25rem;
    border-bottom: 1px solid #f0f4f8;
}

.ss-head-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.ss-head-sub {
    font-size: 0.78rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.45;
}

/* --- Form --- */
.ss-form {
    padding: 0.875rem 1.25rem 1.25rem;
}

.ss-field {
    margin-bottom: 0.45rem;
}

.ss-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid #e4ebf0;
    border-radius: 7px;
    font-size: 0.875rem;
    color: #212529;
    background: #fafbfc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.ss-input:focus {
    border-color: #004a99;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.1);
}

.ss-input.field-error {
    border-color: #e74c3c;
    background: #fff8f7;
}

.ss-error {
    display: block;
    font-size: 0.73rem;
    color: #e74c3c;
    margin-top: 2px;
    min-height: 0;
}

.ss-field--consent {
    margin-bottom: 0.625rem;
    margin-top: 0.25rem;
}

.ss-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.45;
}

.ss-consent-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #004a99;
    width: 13px;
    height: 13px;
    cursor: pointer;
}

.ss-consent-label a {
    color: #004a99;
    text-decoration: underline;
}

.ss-submit {
    width: 100%;
    padding: 0.75rem;
    background: #00bfa5;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.01em;
}

.ss-submit:hover {
    background: #00a892;
}

.ss-submit:active {
    transform: scale(0.98);
}

.ss-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* --- Başarı durumu --- */
.ss-success-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 0.875rem;
}

#salesSlideInSuccess {
    padding: 1.5rem 1.25rem 1.25rem;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 768px) {
    .popup-modal {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        padding: 1.5rem;
    }

    .popup-title {
        font-size: 1.25rem;
    }

    .slide-in-box {
        left: 10px;
        right: auto;
        bottom: 80px;
        width: auto;
        max-width: calc(100vw - 20px);
        max-height: 30vh;
    }

    .sales-slide-in {
        left: 0;
        right: 0;
        width: 100%;
    }

    .ss-tab {
        border-radius: 0;
    }
}
