/* Custom Styles for Property Management System */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

.map-container {
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.leaflet-control-attribution {
    display: none;
}
.main-list-property {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}
[data-color="red"]:hover td, [data-color="red"]:focus td {
    background-color: #ff3333 !important;
}
.main-list-property:hover td, .main-list-property:focus td {
    background-color: #0C6EFD;
    color: #fff;
    opacity: 0.8;
}

.main-list-property td:first-child {
    padding-left: 25px;
}

.main-property-title {
    font-size: 1.5rem;
}

/* Dashboard Stylesheet */

.bg-total-property {
    background-color: #305191;
}
.bg-total-size {
    background-color: #5BC8B8;
}
.bg-total-price {
    background-color: #5BC653;
}
.bg-total-current {
    background-color: #C76857;
}

.color-palette {
    display: flex;
    gap: 5px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
    cursor: pointer;
}

.color-option:hover {
   animation: blink-border 1.8s infinite;
}

.color-palette .active  {
    border: 2px solid #3A3B3B;
}

.color-option:active {
    border: 2px solid #3A3B3B;
}

@keyframes blink-border {
    0%, 100% { 
        border: 3px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% { 
        border: 3px solid rgba(208, 208, 208, 0.8);
        box-shadow: 0 0 20px rgba(208, 208, 208, 0.8);
    }
}

.border-gray-300 {
    border-color: #dee2e6;
}

/* Map container */
#map {
    height: 600px;
    width: 100%;
    z-index: 1;
}

.main-image-map {
    height: 150px;
    object-fit: cover;
}

/* Property info window */
.property-info {
    min-width: 250px;
}

.property-info h5 {
    color: #0d6efd;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

/* Custom markers */
.custom-marker {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Animation for markers */
.marker-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

/* Upload Area Styles */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #e9ecef;
}
#media-upload-area:hover {
    border-color: var(--success-color);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.note-upload {
    font-size: 19px;
}

.media-size, .doc-size {
    font-size: 15px;
}

.media-browse, .doc-browse {
    font-size: 17px;
}

/* File List Styles */
.file-items {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    background-color: white;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-right: 10px;
    word-break: break-all;
}

.file-size {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Keyboard shortcuts hint */
.keyboard-hint {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
}

/* File Preview Styles */
.file-previews {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
}

.preview-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.preview-content {
    text-align: center;
}

.preview-media {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.preview-video {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 8px;
    position: relative;
}

.preview-video i {
    margin-bottom: 5px;
}

.video-type {
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.preview-info {
    text-align: center;
}

.preview-name {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
    word-break: break-all;
    line-height: 1.2;
}

.preview-size {
    font-size: 0.7rem;
    color: #6c757d;
}

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* File upload area */

.file-upload-area, .image-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-area:hover, .file-upload-area.dragover, .image-upload-container:hover, .image-upload-container.dragover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.file-preview {
    max-height: 150px;
    object-fit: cover;
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
}

.image-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin: 5px;
}
.thumbnail-container {
    position: relative;
    display: inline-block;
    margin: 5px;
}
.main-image-badge {
    position: absolute;
    top: 5px;
    right: 5px;
}
.set-main-btn {
    position: absolute;
    bottom: 5px;
    left: 5px;
    padding: 2px 5px;
    font-size: 12px;
}
.remove-image-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 2px 5px;
    font-size: 12px;
}

/* Form validation */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v2'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Loading spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

/* Property table */
.property-table img {
    max-width: 80px;
    max-height: 60px;
    object-fit: cover;
}

/* Login page styling */
.login-container {
    min-height: calc(100vh - 116px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: none;
    border-radius: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-container {
        height: auto;
    }
    #map {
        height: 400px;
    }
    
    .property-info {
        min-width: 200px;
    }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 15px;
    font-family: 'Kantumruy Pro', sans-serif;
}

/* Custom button animations */
.btn-animate {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-animate:hover {
    transform: translateY(-2px);
}

.btn-animate:active {
    transform: translateY(1px);
}