/* Missing Station Report Styles */

/* Missing Station Button in Sidebar */
.missing-station-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.missing-station-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.missing-station-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.missing-station-btn i {
    font-size: 16px;
}

/* Context Menu */
.missing-station-context-menu {
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    min-width: 180px;
    z-index: 1000;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-menu-item i {
    color: #007bff;
}

/* Missing Station Marker */
.missing-station-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Modal Styles */
.missing-station-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.missing-station-modal .modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 100000;
}

.missing-station-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.missing-station-modal .modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.missing-station-modal .close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.missing-station-modal .close:hover,
.missing-station-modal .close:focus {
    color: #000;
    text-decoration: none;
}

.missing-station-modal .modal-body {
    padding: 24px;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.alert-info {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #0c5aa6;
}

.alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

.alert strong {
    font-weight: 600;
}

.missing-station-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Form Styles */
.form-section {
    margin-bottom: 32px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    position: relative;
    z-index: 100001;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Ensure select dropdowns appear above map elements */
.form-group select {
    position: relative;
    z-index: 100002;
}

.form-group select:focus {
    z-index: 100003;
}

/* Override any mapbox z-index issues */
.missing-station-modal * {
    z-index: inherit;
}

.missing-station-modal .form-group select {
    z-index: 100002 !important;
}

.missing-station-modal .form-group select:focus {
    z-index: 100003 !important;
}

/* Custom brand input styling */
#other-brand-group {
    margin-top: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

#other-brand-group label {
    color: #495057;
    font-weight: 600;
}

#missing-other-brand {
    margin-top: 6px;
    border: 2px solid #007bff;
    background-color: #fff;
}

#missing-other-brand:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 12px;
}

/* Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.facility-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 14px;
}

.facility-checkbox:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.facility-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.facility-checkbox input[type="checkbox"]:checked + span,
.facility-checkbox:has(input[type="checkbox"]:checked) {
    background-color: #e7f3ff;
    border-color: #007bff;
    color: #007bff;
    font-weight: 500;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s;
    min-width: 100px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-primary:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Responsive Design */
@media (max-width: 768px) {
    .missing-station-modal .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .missing-station-modal .modal-header,
    .missing-station-modal .modal-body,
    .missing-station-modal .modal-footer {
        padding: 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .facilities-grid {
        grid-template-columns: 1fr;
    }
    
    .missing-station-modal .modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
    }
    
    .missing-station-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .missing-station-modal .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }
    
    .missing-station-modal .modal-header {
        border-radius: 0;
    }
    
    .missing-station-modal .modal-footer {
        border-radius: 0;
    }
}
