/* ==========================================================================
   MODALS.CSS - Modal Sistemi ve Notification Stilleri
   ========================================================================== */

/* Modal Sistemi - Minimalist Tasarım */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 360px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-bg);
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    color: var(--light-text);
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background-color: var(--danger-color);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-form {
    padding: 20px;
}

.modal-form .form-group {
    margin-bottom: 15px;
}

.modal-form .form-group:last-of-type {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.modal-form input[type="text"],
.modal-form input[type="email"],
.modal-form input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background-color: var(--white);
}

.modal-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-10);
}

.modal-form small {
    display: block;
    color: var(--light-text);
    font-size: 0.8rem;
    margin-top: 3px;
}

/* Checkbox Stili */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
    color: var(--text-color) !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    position: absolute;
    color: var(--white);
    font-size: 12px;
    top: -2px;
    left: 2px;
}

/* Modal Butonu */
.btn-modal {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
}

.btn-modal:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-modal:disabled {
    background-color: var(--light-text);
    cursor: not-allowed;
    transform: none;
}

.btn-modal.loading:after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Modal Linkler */
.modal-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.modal-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    padding: 3px 0;
}

.modal-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Bildirim Sistemi */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    min-width: 280px;
    max-width: 400px;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    background-color: var(--success-color);
    color: var(--white);
    border-left: 4px solid var(--primary-color);
}

.notification.error {
    background-color: var(--danger-color);
    color: var(--white);
    border-left: 4px solid var(--danger-color);
}

.notification.info {
    background-color: var(--primary-color);
    color: var(--white);
    border-left: 4px solid var(--secondary-color);
}

.notification.warning {
    background-color: var(--warning-color);
    color: var(--white);
    border-left: 4px solid var(--accent-color);
}

.notification-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
}

.notification-icon {
    font-size: 16px;
    opacity: 0.9;
}

.notification-message {
    flex: 1;
    line-height: 1.3;
}

.notification-close {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 6px 6px;
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Modal Tasarımı */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-form {
        padding: 15px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        top: 70px;
    }
    
    .notification-content {
        font-size: 0.85rem;
    }
}
