/* Custom styles for the WebGIS 3D application */

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

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Control panel enhancements */
.control-panel {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-panel:hover {
    background: rgba(255, 255, 255, 0.95);
}

/* Button groups */
.btn-group-vertical .btn {
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-group-vertical .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.btn-group-vertical .btn:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-bottom: none;
}

/* Info panel styling */
.info-panel {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

.land-info .row {
    font-size: 0.9rem;
}

.land-info .col-5 {
    color: #495057;
}

.land-info .col-7 {
    color: #212529;
    word-break: break-word;
}

/* View mode toggle styling */
.view-mode-toggle .btn {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

.view-mode-toggle .btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.view-mode-toggle .btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #212529;
}

/* Home button specific styling */
#home-view {
    transition: all 0.3s ease-in-out;
}

#home-view:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}

#home-view:active {
    transform: scale(0.95);
}

/* Responsive design */
@media (max-width: 768px) {
    .control-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        max-width: none;
        border-radius: 0;
        z-index: 1001;
    }
    
    .view-mode-toggle {
        top: auto;
        bottom: 10px;
        right: 10px;
    }
    
    .info-panel {
        left: 10px;
        right: 10px;
        bottom: 70px;
        max-width: none;
    }
}

/* Checkbox and radio button styling */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Custom scrollbar for info panel */
.info-panel::-webkit-scrollbar {
    width: 6px;
}

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

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

.info-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Toast messages */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.loading-content {
    text-align: center;
    color: white;
}

/* Error states */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Cesium viewer customizations */
.cesium-viewer-toolbar {
    display: none;
}

.cesium-viewer-bottom {
    display: none;
}

/* Credits customization */
.cesium-widget-credits {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Selection indicator customization */
.cesium-selection-wrapper {
    pointer-events: none;
}

/* Info box styling if needed */
.cesium-infoBox {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* Utility classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 3D Model zoom button */
#zoom-to-3d-model {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
    vertical-align: middle;
    transition: all 0.2s ease-in-out;
}

#zoom-to-3d-model:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#zoom-to-3d-model i {
    font-size: 0.8rem;
}

/* Form check layout with button */
.form-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.form-check .form-check-input {
    margin-right: 0.5rem;
}

.form-check .form-check-label {
    flex: 1;
    margin-bottom: 0;
}

/* Print styles */
@media print {
    .control-panel,
    .view-mode-toggle,
    .info-panel {
        display: none !important;
    }
}