/**
 * DS Popup Manager - Frontend Styles
 * Preserves exact structure from reference HTML files
 * Scoped to prevent theme conflicts
 */

/* ============================================
   MODAL POPUP STYLES (from final-ana-popup.html)
   ============================================ */

.ds-main-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ds-main-wrapper.ds-popup-active {
    opacity: 1;
    visibility: visible;
}

.ds-main-wrapper *,
.ds-main-wrapper *::before,
.ds-main-wrapper *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Popup Container */
.ds-main-wrapper .ds-popup-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 820px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    padding: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.ds-main-wrapper.ds-popup-active .ds-popup-card {
    transform: scale(1);
}

/* İçerik Alanı */
.ds-main-wrapper .ds-popup-card .ds-content-inner {
    width: 50%;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo */
.ds-main-wrapper .ds-content-inner .ds-brand-logo {
    margin-bottom: 2.5rem;
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: #000000;
}

/* Sub-heading */
.ds-main-wrapper .ds-content-inner .ds-sub-heading {
    display: block;
    color: var(--secondary, #6A6C77);
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Title */
.ds-main-wrapper .ds-content-inner .ds-main-title {
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--title-color, #000000);
    margin-bottom: 1rem;
}

/* Description */
.ds-main-wrapper .ds-content-inner .ds-main-description {
    color: var(--secondary, #6A6C77);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Button Group */
.ds-main-wrapper .ds-content-inner .ds-btn-group {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
}

/* CTA Buttons */
.ds-main-wrapper .ds-btn-group .ds-btn {
    flex: 1;
    background-color: var(--primary, #0544f2);
    color: #ffffff;
    font-weight: 400 !important;
    padding: 0.875rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 9999px;
    text-decoration: none;
    text-align: center;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.ds-main-wrapper .ds-btn-group .ds-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Primary Button (default) */
.ds-main-wrapper .ds-btn-group .ds-btn-primary {
    background-color: var(--primary, #0544f2);
    color: #ffffff;
    border-color: transparent;
}

/* Secondary Button (plain text style) */
.ds-main-wrapper .ds-btn-group .ds-btn-secondary {
    background-color: transparent;
    color: var(--primary, #0544f2);
    border-color: transparent;
    flex: 0 0 auto;
    padding: 0 16px;
}

.ds-main-wrapper .ds-btn-group .ds-btn-secondary:hover {
    opacity: 1;
    transform: none;
}

.ds-main-wrapper .ds-btn-group .ds-btn-secondary svg {
    width: 16px;
    height: 16px;
}

/* Button Icons - Standardized */
.ds-main-wrapper .ds-btn-group .ds-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Image Wrapper */
.ds-main-wrapper .ds-popup-card .ds-image-wrapper {
    width: 50%;
    padding: 0;
    position: relative;
}

/* Close Button */
.ds-main-wrapper .ds-image-wrapper .ds-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ds-main-wrapper .ds-image-wrapper .ds-close-btn svg {
    width: 16px;
    height: 16px;
}

.ds-main-wrapper .ds-image-wrapper .ds-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Image Container */
.ds-main-wrapper .ds-image-wrapper .ds-img-container {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.ds-main-wrapper .ds-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* RESPONSIVE - Modal */
@media (max-width: 768px) {
    .ds-main-wrapper .ds-popup-card {
        flex-direction: column-reverse;
        max-width: 450px;
    }

    .ds-main-wrapper .ds-popup-card .ds-content-inner,
    .ds-main-wrapper .ds-popup-card .ds-image-wrapper {
        width: 100%;
    }

    .ds-main-wrapper .ds-popup-card .ds-content-inner {
        padding: 24px;
        text-align: left;
    }

    .ds-main-wrapper .ds-content-inner .ds-brand-logo {
        margin-bottom: 1.5rem;
    }

    .ds-main-wrapper .ds-content-inner .ds-main-title {
        font-size: 1.75rem;
    }

    /* Mobilde butonlar üst üste */
    .ds-main-wrapper .ds-content-inner .ds-btn-group {
        flex-direction: column;
    }

    .ds-main-wrapper .ds-btn-group .ds-btn {
        width: 100%;
    }

    .ds-main-wrapper .ds-image-wrapper .ds-img-container {
        height: 180px;
    }
}


/* ============================================
   SNACKBAR POPUP STYLES (from snackbar-popup.html)
   ============================================ */

.ks-popup-root {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ks-popup-root *,
.ks-popup-root *::before,
.ks-popup-root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Container */
.ks-popup-root .ks-popup-container {
    position: fixed;
    bottom: -500px;
    left: 0;
    width: 100%;
    z-index: 99999;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ks-popup-root.ks-popup-active .ks-popup-container {
    bottom: 0;
}

/* Card */
.ks-popup-root .ks-popup-container .ks-popup-card {
    position: relative;
    background-color: #ffffff;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1), 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 3px;
}

/* Close Button (Mobile) */
.ks-popup-root .ks-popup-card .ks-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.ks-popup-root .ks-popup-card .ks-popup-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Flex Container */
.ks-popup-root .ks-popup-card .ks-popup-flex {
    display: flex;
    flex-direction: column;
}

/* Image Box */
.ks-popup-root .ks-popup-flex .ks-popup-img-box {
    flex-shrink: 0;
    overflow: hidden;
    width: 100%;
}

.ks-popup-root .ks-popup-img-box .ks-popup-img {
    width: 100%;
    height: 224px;
    object-fit: cover;
    border-top-left-radius: 29px;
    border-top-right-radius: 29px;
    display: block;
}

/* Content */
.ks-popup-root .ks-popup-flex .ks-popup-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ks-popup-root .ks-popup-content .ks-popup-title {
    color: #111827;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.ks-popup-root .ks-popup-content .ks-popup-text {
    color: #6B7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 360px;
}

/* Actions */
.ks-popup-root .ks-popup-content .ks-popup-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ks-popup-root .ks-popup-actions .ks-btn-main {
    flex: 1;
    background-color: var(--btn-main-bg, #0B0F19);
    color: var(--btn-main-text, #ffffff);
    font-size: 15px;
    font-weight: 500 !important;
    padding: 14px 32px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: opacity 0.2s;
}

.ks-popup-root .ks-popup-actions .ks-btn-main:hover {
    opacity: 0.9;
}

.ks-popup-root .ks-popup-actions .ks-btn-link {
    background: none;
    border: none;
    color: var(--btn-link-color, #3B82F6);
    font-size: 15px;
    font-weight: 500 !important;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ks-popup-root .ks-popup-actions .ks-btn-link:hover {
    opacity: 0.8;
}

.ks-popup-root .ks-popup-card .ks-mobile-gap {
    height: 24px;
}

/* DESKTOP - Snackbar */
@media (min-width: 768px) {
    .ks-popup-root .ks-popup-container {
        bottom: -500px;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
    }

    .ks-popup-root.ks-popup-active .ks-popup-container {
        bottom: 40px;
    }

    .ks-popup-root .ks-popup-container .ks-popup-card {
        border-radius: 28px;
    }

    .ks-popup-root .ks-popup-card .ks-popup-close {
        background-color: transparent;
        color: #94a3b8;
        backdrop-filter: none;
    }

    .ks-popup-root .ks-popup-card .ks-popup-close:hover {
        background-color: #f1f5f9;
    }

    .ks-popup-root .ks-popup-card .ks-popup-close svg {
        width: 16px;
        height: 16px;
    }

    .ks-popup-root .ks-popup-card .ks-popup-flex {
        flex-direction: row;
    }

    .ks-popup-root .ks-popup-flex .ks-popup-img-box {
        width: 144px;
    }

    .ks-popup-root .ks-popup-img-box .ks-popup-img {
        height: 100%;
        border-radius: 25px;
    }

    .ks-popup-root .ks-popup-flex .ks-popup-content {
        padding: 32px 64px 32px 28px;
    }

    .ks-popup-root .ks-popup-content .ks-popup-title {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .ks-popup-root .ks-popup-content .ks-popup-text {
        font-size: 13.5px;
        margin-bottom: 20px;
    }

    .ks-popup-root .ks-popup-actions .ks-btn-main {
        flex: none;
        font-size: 13px;
        padding: 10px 24px;
        border-radius: 9999px;
    }

    .ks-popup-root .ks-popup-actions .ks-btn-link {
        font-size: 13px;
    }

    .ks-popup-root .ks-popup-card .ks-mobile-gap {
        display: none;
    }
}
