/* Import Dialog Styles */
.import-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 30, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.import-dialog-content {
    background: #152a47;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.close-dialog-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #e2e8f0;
    z-index: 10;
}

.close-dialog-btn:hover {
    color: #f87171;
}

/* Dialog Buttons */
.primary-button, .secondary-button, .action-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.primary-button {
    background: #3b6ef6;
    color: white;
}

.secondary-button {
    background: #2d4268;
    color: #e2e8f0;
}

.action-button {
    background: #3b49c4;
    color: white;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    background-color: #1d4ed8;
}

/* Enhanced Drag & Drop Styles */
.drag-drop-area {
    border: 2px dashed #3b6ef6;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    margin: 15px 0;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(26, 48, 90, 0.3);
    position: relative;
}

.drag-drop-area:hover {
    background: rgba(26, 48, 90, 0.5);
    border-color: #6b9fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.drag-over {
    background: rgba(26, 48, 90, 0.7) !important;
    border-color: #60a5fa !important;
    transform: scale(1.02);
}

.file-icon {
    font-size: 36px;
    color: #6b9fff;
    display: block;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.drag-drop-area:hover .file-icon {
    transform: translateY(-5px);
}

.file-text {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #e2e8f0;
    font-size: 16px;
    transition: color 0.3s;
}

.file-selected {
    color: #60a5fa !important;
    padding: 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.file-error {
    color: #f87171 !important;
    padding: 10px;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 4px;
}

.supported-formats {
    color: #94a3b8;
    font-size: 0.9em;
    margin-top: 12px;
    transition: opacity 0.3s;
}

.drag-drop-area:hover .supported-formats {
    opacity: 0.8;
}

/* Animation for when a file is dropped */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.file-drop-animation {
    animation: pulse 0.5s ease;
}

/* Layers containers for dialogs */
.layers-container, .layers-container-url {
    overflow-y: auto;
    border: 1px solid #203759;
    border-radius: 6px;
    padding: 10px;
    background: rgba(10, 20, 40, 0.3);
}

.layers-container {
    max-height: 100px;
}

.layers-container-url {
    max-height: 200px;
    background-color: #1e293b;
    border-color: #334155;
}

/* URL and form fields */
.url-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
}

.url-input {
    width: 100%;
    border: 1px solid #334155;
    border-radius: 6px;
    background-color: #1a305a;
    color: #e2e8f0;
    font-size: 14px;
    height: 36px;
    padding-left: 12px;
}

.url-input:focus {
    outline: none;
    border-color: rgba(59, 110, 246, 0.5);
    background: rgba(26, 48, 90, 0.4);
}

.url-input:disabled {
    background-color: #162a4d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* URL type selectors */
.url-type-selector {
    display: flex;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
    border: 1px solid #334155;
}

/* URL input groups */
.url-input-group {
    margin-bottom: 15px;
}

.url-input-group.active {
    display: block;
}

.url-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #93c5ff;
}

.url-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.url-input-container label {
    display: inline-block;
    margin-bottom: 0;
    white-space: nowrap;
    min-width: 150px;
}

.url-input-container .action-button {
    margin-top: 0;
    height: 36px;
    padding: 0 16px;
    white-space: nowrap;
}

/* URL Layers panel */
.url-layers-panel {
    margin-top: 20px;
    border-top: 1px solid #334155;
    padding-top: 15px;
}

.url-layers-panel h4 {
    color: #60a5fa;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Parameters/Form fields */
.file-params-container {
    margin-bottom: 20px;
}

.param-group {
    margin-bottom: 15px;
}

.param-group label,
.url-container label,
.file-params-container label,
.input-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #93c5ff;
}

.input-container label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.param-group input[type="text"],
.param-group textarea,
.param-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    background-color: #1e293b;
    color: #e2e8f0;
    font-size: 14px;
    margin-bottom: 10px;
}

.param-group textarea {
    min-height: 80px;
    resize: vertical;
}

.param-group input::placeholder,
.param-group textarea::placeholder {
    color: rgba(162, 184, 218, 0.6);
    opacity: 1;
}

/* Processing indicator */
.processing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 26, 54, 0.8);
    z-index: 100;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #60a5fa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Helper elements */
.hidden {
    display: none;
}

.separator {
    text-align: center;
    margin: 10px 0;
    color: #a3b8da;
}

.supported-formats {
    color: #94a3b8;
    font-size: 0.9em;
    margin-top: 8px;
}

.input-container {
    display: flex;
    padding: 15px;
    flex-direction: column;
    gap: 8px;
}

.input-container h3 {
    margin-bottom: 10px;
    color: #e2e8f0;
    font-size: 18px;
    font-weight: 500;
}