/* Pop-up Base Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.popup-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    color: #333;
}

.popup-content {
    padding: 20px;
}

.popup-content h1,
.popup-content h2,
.popup-content h3,
.popup-content h4,
.popup-content h5,
.popup-content h6 {
    margin-top: 0;
    margin-bottom: 15px;
}

.popup-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.popup-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.popup-content .btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.popup-content .btn:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

.popup-content .btn-primary {
    background: #007bff;
}

.popup-content .btn-primary:hover {
    background: #0056b3;
}

.popup-content .btn-success {
    background: #28a745;
}

.popup-content .btn-success:hover {
    background: #1e7e34;
}

.popup-content .btn-danger {
    background: #dc3545;
}

.popup-content .btn-danger:hover {
    background: #c82333;
}

.popup-content .btn-warning {
    background: #ffc107;
    color: #212529;
}

.popup-content .btn-warning:hover {
    background: #e0a800;
    color: #212529;
}

/* Position Styles */
.popup-position-merkez {
    align-items: center;
    justify-content: center;
}

.popup-position-sag_ust {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
}

.popup-position-sol_ust {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.popup-position-sag_alt {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
}

.popup-position-sol_alt {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
}

.popup-position-sag_ust .popup-container,
.popup-position-sol_ust .popup-container,
.popup-position-sag_alt .popup-container,
.popup-position-sol_alt .popup-container {
    max-width: 400px;
}

/* Animation Styles */
.popup-animation-fade .popup-container {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.popup-animation-fade.active .popup-container {
    opacity: 1;
}

.popup-animation-slide .popup-container {
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.popup-animation-slide.active .popup-container {
    transform: translateY(0);
}

.popup-animation-bounce .popup-container {
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.popup-animation-none .popup-container {
    transition: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-container {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
    
    .popup-position-sag_ust,
    .popup-position-sol_ust,
    .popup-position-sag_alt,
    .popup-position-sol_alt {
        padding: 10px;
    }
    
    .popup-position-sag_ust .popup-container,
    .popup-position-sol_ust .popup-container,
    .popup-position-sag_alt .popup-container,
    .popup-position-sol_alt .popup-container {
        max-width: none;
        width: 100%;
    }
    
    .popup-title {
        font-size: 20px;
        padding-right: 40px;
    }
    
    .popup-content {
        padding: 15px;
    }
}

/* Scrollbar Styles */
.popup-container::-webkit-scrollbar {
    width: 6px;
}

.popup-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.popup-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.popup-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Auto-close indicator */
.popup-auto-close-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: #007bff;
    border-radius: 10px 10px 0 0;
    transition: width linear;
}

/* Loading state */
.popup-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.popup-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .popup-container {
        background: #2d2d2d;
        color: #fff;
    }
    
    .popup-header {
        border-bottom-color: #444;
    }
    
    .popup-title {
        color: #fff;
    }
    
    .popup-close {
        color: #ccc;
    }
    
    .popup-close:hover {
        color: #fff;
    }
} 