/* Harita Projesi - Ana CSS */

/* Harita Container */
.harita-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#harita-map {
    width: 100%;
    height: 500px;
    z-index: 1;
}

/* Loading Spinner */
.harita-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.harita-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.harita-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Custom Marker Styles */
.custom-marker-icon {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    background: transparent !important;
    border: none !important;
}

/* Marker Background Styles */
.custom-marker-with-background {
    background: white !important;
    border-radius: 50% !important;
    padding: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.custom-marker-with-background img {
    border-radius: 50% !important;
    object-fit: contain !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 15px;
    line-height: 1.4;
}

.harita-popup-title {
    font-weight: bold;
    color: #007cba;
    margin-bottom: 8px;
    font-size: 16px;
}

.harita-popup-address {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.harita-popup-country {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admin Panel Styles */
.harita-admin-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.harita-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e1e1;
}

.harita-locations-table {
    margin-top: 20px;
}

.harita-locations-table table {
    width: 100%;
    border-collapse: collapse;
}

.harita-locations-table th,
.harita-locations-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.harita-locations-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Modal Styles */
.harita-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.harita-modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.harita-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.harita-modal-header h3 {
    margin: 0;
    color: #333;
}

.harita-modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.harita-modal-close:hover {
    color: #333;
}

.harita-modal-body {
    padding: 20px;
}

.harita-modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: right;
}

.harita-modal-footer .button {
    margin-left: 10px;
}

/* Settings Page Styles */
.harita-settings-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.harita-settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.harita-settings-section:last-child {
    border-bottom: none;
}

.harita-settings-section h2 {
    color: #333;
    margin-bottom: 10px;
}

.harita-usage-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.harita-usage-info h3,
.harita-usage-info h4 {
    color: #007cba;
    margin-top: 20px;
    margin-bottom: 10px;
}

.harita-usage-info h3:first-child {
    margin-top: 0;
}

.harita-usage-info code {
    background: #e1e1e1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d63384;
}

.harita-usage-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.harita-usage-info li {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .harita-admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .harita-locations-table {
        overflow-x: auto;
    }
    
    .harita-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .harita-modal-header,
    .harita-modal-body,
    .harita-modal-footer {
        padding: 15px;
    }
    
    #harita-map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .harita-container {
        margin: 10px 0;
    }
    
    #harita-map {
        height: 300px;
    }
    
    .harita-locations-table th,
    .harita-locations-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .harita-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .harita-popup-title {
        color: #4a9eff;
    }
    
    .harita-popup-address {
        color: #ccc;
    }
    
    .harita-popup-country {
        color: #999;
    }
}

/* Animation for smooth loading */
.harita-container {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Button hover effects */
.harita-modal-footer .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Custom scrollbar for modal */
.harita-modal-content::-webkit-scrollbar {
    width: 6px;
}

.harita-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.harita-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.harita-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
