/* Son Karar AI Modal CSS - Custom GPT Style */

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Konfeti Animasyonu */
.sonkarar-ai-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
    display: none;
}

.sonkarar-ai-confetti-container .confetti-piece {
    position: absolute;
    width: 10px;
    height: 30px;
    background: #0d0d0d;
    top: 0;
    opacity: 0;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(1) {
    left: 7%;
    transform: rotate(-40deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 182ms;
    animation-duration: 1116ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(2) {
    left: 14%;
    transform: rotate(4deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 161ms;
    animation-duration: 1076ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(3) {
    left: 21%;
    transform: rotate(-51deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 481ms;
    animation-duration: 1103ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(4) {
    left: 28%;
    transform: rotate(61deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 334ms;
    animation-duration: 708ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(5) {
    left: 35%;
    transform: rotate(-52deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 302ms;
    animation-duration: 776ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(6) {
    left: 42%;
    transform: rotate(38deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 180ms;
    animation-duration: 1168ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(7) {
    left: 49%;
    transform: rotate(11deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 395ms;
    animation-duration: 1200ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(8) {
    left: 56%;
    transform: rotate(49deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 14ms;
    animation-duration: 887ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(9) {
    left: 63%;
    transform: rotate(-72deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 149ms;
    animation-duration: 805ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(10) {
    left: 70%;
    transform: rotate(4deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 351ms;
    animation-duration: 1059ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(11) {
    left: 77%;
    transform: rotate(42deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 307ms;
    animation-duration: 1132ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(12) {
    left: 84%;
    transform: rotate(45deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 464ms;
    animation-duration: 776ms;
}

.sonkarar-ai-confetti-container .confetti-piece:nth-child(13) {
    left: 91%;
    transform: rotate(-72deg);
    animation: makeItRain 1000ms infinite ease-out;
    animation-delay: 429ms;
    animation-duration: 818ms;
}

@keyframes makeItRain {
    to {
        transform: translateY(350px);
    }
}

/* Modal Overlay - GPT Style */
.sonkarar-ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sonkarar-ai-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - GPT Style */
.sonkarar-ai-modal {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 32rem; /* 512px equivalent to max-w-lg */
    position: relative;
    box-shadow: 0px 8px 12px 0px rgba(0, 0, 0, 0.08), 0px 0px 1px 0px rgba(0, 0, 0, 0.62);
    text-align: start;
    animation: modalAppear 0.3s ease-out;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: hidden;
    z-index: 100;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Background image with blur effect */
.sonkarar-ai-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%; /* Modalın %55'ini kapla */
    background-image: url('/static/images/sonkarar-ai-bg.webp');
    background-size: 100% auto; /* Zoom'u azalttım */
    background-position: center 80%; /* Resmin en aşağısından başlat */
    background-repeat: no-repeat;
    filter: blur(32px);
    opacity: 0;
    transform: scale(1.02);
    mask-image: linear-gradient(to bottom, white 0%, white 40%, rgba(255,255,255,0.8) 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, white 0%, white 40%, rgba(255,255,255,0.8) 60%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sonkarar-ai-modal.bg-loaded::before {
    opacity: 0.35;
}

/* Modal Header - GPT Style */
.sonkarar-ai-modal-header {
    min-height: 3.25rem; /* 52px equivalent to min-h-header-height */
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0.5rem 0.625rem 1rem; /* py-2.5 ps-4 pe-2 */
    user-select: none;
    position: relative;
    z-index: 1;
}

/* Close Button - GPT Style */
.sonkarar-ai-close-button {
    background: transparent;
    border: none;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #0d0d0d;
    flex-shrink: 0;
}

.sonkarar-ai-close-button:hover {
    background: #f9f9f9;
}

.sonkarar-ai-close-button:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.2);
    outline-offset: 1px;
}

.sonkarar-ai-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Modal Content - GPT Style */
.sonkarar-ai-modal-content {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.sonkarar-ai-content-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

@media (min-width: 640px) {
    .sonkarar-ai-content-inner {
        padding: 3.5rem 2.5rem 3rem 2.5rem;
    }
}

/* Modal Title - GPT Style */
.sonkarar-ai-modal-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600;
    color: #0d0d0d;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    font-family: ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif;
}

/* Modal Description - GPT Style */
.sonkarar-ai-modal-description {
    font-size: 0.875rem; /* text-sm */
    color: #5d5d5d;
    line-height: 1.43;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif;
}

/* Button Group - GPT Style */
.sonkarar-ai-button-group {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .sonkarar-ai-button-group {
        gap: 0.625rem;
    }
}

/* Button Base Style - GPT Style */
.sonkarar-ai-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem; /* Dikey padding'i azalttım */
    border-radius: 1.5rem; /* 24px - çok daha yuvarlak */
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    min-height: 2.75rem; /* Min height'i biraz azalttım */
    font-family: ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif;
}

/* Primary Button - GPT Style */
.sonkarar-ai-btn-primary {
    background: #0d0d0d;
    color: white;
}

.sonkarar-ai-btn-primary:hover {
    background: rgba(13, 13, 13, 0.8);
}

.sonkarar-ai-btn-primary:active {
    background: rgba(13, 13, 13, 0.9);
}

/* Secondary Button - GPT Style */
.sonkarar-ai-btn-secondary {
    background: white;
    color: #0d0d0d;
    border: 1px solid #e3e3e3;
}

.sonkarar-ai-btn-secondary:hover {
    background: #f9f9f9;
    border-color: #d0d0d0;
}

.sonkarar-ai-btn-secondary:active {
    background: #f0f0f0;
    border-color: #c0c0c0;
}

/* Legacy button class for backward compatibility */
.sonkarar-ai-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e3e3e3;
    text-decoration: none;
    white-space: nowrap;
    min-height: 2.75rem;
    font-family: ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif;
    background: white;
    color: #0d0d0d;
}

.sonkarar-ai-button:hover {
    background: #f9f9f9;
    border-color: #d0d0d0;
}

.sonkarar-ai-button:active {
    background: #f0f0f0;
    border-color: #c0c0c0;
}

/* CTA Section - Legacy Support */
.sonkarar-ai-cta-section {
    padding: 0 32px 32px 32px;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sonkarar-ai-modal {
        margin: 20px;
        max-width: none;
        width: calc(100% - 40px);
    }
    
    .sonkarar-ai-content-inner {
        padding: 20px 24px;
    }
    
    .sonkarar-ai-modal-title {
        font-size: 1.125rem;
    }
    
    .sonkarar-ai-modal-description {
        font-size: 0.8125rem;
    }
    
    .sonkarar-ai-btn {
        width: 100%;
        min-width: auto;
    }
    
    .sonkarar-ai-button {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .sonkarar-ai-modal {
        margin: 16px;
        width: calc(100% - 32px);
        border-radius: 20px;
    }
    
    .sonkarar-ai-content-inner {
        padding: 16px 20px;
    }
    
    .sonkarar-ai-modal-title {
        font-size: 1rem;
    }
    
    .sonkarar-ai-modal-description {
        font-size: 0.75rem;
        margin-bottom: 1.25rem;
    }
}