/* Etkinlik Yönetim Modal Styles */
.event-management-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-modal-content {
    position: relative;
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    border-radius: 15px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.event-modal-header {
    background: linear-gradient(135deg, #7030a0 0%, #5b2681 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.event-modal-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.event-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 300;
}

.event-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-modal-body {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow: hidden;
}

/* Tab Navigation */
.event-tab-nav {
    /* display: flex !important; */
    display: none ;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
}

.event-tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.event-tab-button.active {
    color: #7030a0;
    background-color: white;
    border-bottom-color: #7030a0;
    font-weight: 600;
}

.event-tab-button:hover {
    background-color: #e9ecef;
    color: #7030a0;
}

.event-tab-button i {
    margin-right: 8px;
    font-size: 14px;
}

/* Tab Content */
.event-tab-content {
    display: none;
    padding: 30px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    background-color: #fff;
}

.event-tab-content.active {
    display: block;
}

/* Events List Container */
.events-list-container {
    background-color: #fff;
    min-height: 400px;
}

/* Events List Tab */
.events-list-container {
    background-color: white;
    padding: 0;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.events-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.add-event-btn {
    background: linear-gradient(135deg, #7030a0 0%, #5b2681 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-event-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(112, 48, 160, 0.3);
}

.add-event-btn i {
    font-size: 16px;
}

/* Events Table */
.events-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.events-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
}

.events-table td {
    padding: 15px;
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle;
}

.events-table tr:hover {
    background-color: #f8f9fa;
}

.event-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.event-title-cell {
    max-width: 300px;
    font-weight: 500;
    color: #333;
}

.event-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.edit-event-btn, .delete-event-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-event-btn {
    background-color: #17a2b8;
    color: white;
}

.edit-event-btn:hover {
    background-color: #138496;
    transform: translateY(-1px);
}

.delete-event-btn {
    background-color: #dc3545;
    color: white;
}

.delete-event-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Event Form Tab */
.event-form-container {
    background-color: white;
}

.event-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #7030a0;
    box-shadow: 0 0 0 3px rgba(112, 48, 160, 0.1);
}

.form-control.error {
    border-color: #dc3545;
}

.form-control.success {
    border-color: #28a745;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Image Upload */
.image-upload-simple {
    text-align: center;
    padding: 20px;
}

.btn-outline-primary {
    background-color: transparent;
    border: 2px solid #7030a0;
    color: #7030a0;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-primary:hover {
    background-color: #7030a0;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(112, 48, 160, 0.3);
}

.upload-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.upload-text {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 10px;
}

.upload-hint {
    color: #adb5bd;
    font-size: 14px;
}

.image-preview {
    margin-top: 20px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Buttons */
.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #7030a0 0%, #5b2681 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(112, 48, 160, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #7030a0;
    animation: spin 1s ease-in-out infinite;
    margin: 50px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 96vh;
    }
    
    .event-modal-header {
        padding: 20px 15px;
    }
    
    .event-modal-title {
        font-size: 22px;
    }
    
    .event-tab-content {
        padding: 20px 15px;
    }
    
    .events-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .add-event-btn {
        justify-content: center;
    }
    
    .events-table {
        font-size: 14px;
    }
    
    .events-table th,
    .events-table td {
        padding: 10px 8px;
    }
    
    .event-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .event-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .edit-event-btn,
    .delete-event-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .empty-state {
        padding: 60px 15px;
    }
    
    .empty-state-icon {
        font-size: 60px;
    }
    
    .empty-state-title {
        font-size: 20px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 25px;
    opacity: 0.4;
    color: #adb5bd;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #495057;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 30px;
    color: #6c757d;
    line-height: 1.6;
}

/* Success/Error Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Custom Scrollbar */
.event-tab-content::-webkit-scrollbar {
    width: 8px;
}

.event-tab-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.event-tab-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.event-tab-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* SweetAlert2 z-index fix */
.swal-high-zindex {
    z-index: 99999 !important;
}

.swal2-container {
    z-index: 99999 !important;
}

/* No Image Placeholder */
.event-img img[src*="no-image.png"],
.event-img img[src="assets/imgs/no-image.png"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.event-img img[src*="no-image.png"]::after,
.event-img img[src="assets/imgs/no-image.png"]::after {
    content: "Resim Yok";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
}

.event-modal-controls {
    display: flex;
    align-items: center;
}

#toggleImageUpload {
    margin-right: 10px;
    font-size: 0.9rem;
}

.image-upload-container {
    transition: all 0.3s ease;
}

/* Adjust the modal header to accommodate the controls */
.event-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}
