body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.header-left {
    flex: 1;
    text-align: center;
}

.header-right {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.controls-container {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.15);
    padding: 8px 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-info span {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.user-info button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-weight: 500;
}

.user-info #adminBtn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.user-info #adminBtn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.logout-btn {
    background: #e53e3e !important;
    color: white !important;
}

.logout-btn:hover {
    background: #c53030 !important;
    transform: translateY(-1px);
}

.change-password-btn {
    background: #3182ce !important;
    color: white !important;
    margin-right: 8px;
}

.change-password-btn:hover {
    background: #2c5aa0 !important;
    transform: translateY(-1px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-icon {
    font-size: 20px;
}

#map {
    height: calc(100vh - 180px);
    width: 100%;
}

.emoji-icon {
    background: none !important;
    border: none !important;
    text-align: center;
    font-size: 24px;
    line-height: 30px;
}

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

.dialog {
    background: white;
    border-radius: 8px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dialog h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

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

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

.coordinates-display {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-family: monospace;
    color: #495057;
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary,
.btn-info,
.btn-success {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

#tempCounter {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* Help Dialog Styles */
.help-content {
    text-align: left;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom styles for help dialog specifically */
#helpDialog .dialog {
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
}

.help-content h4 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.help-content h4:first-child {
    margin-top: 0;
}

.help-content p {
    margin-bottom: 15px;
    color: #555;
}

.legend-help {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.legend-help .legend-item {
    display: block;
    padding: 5px 0;
    font-family: monospace;
    font-size: 16px;
}

/* PDF Export Styles */
.export-info {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #27ae60;
}

.export-info p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #27ae60;
}

.export-info ul {
    margin: 0;
    padding-left: 20px;
}

.export-info li {
    margin: 5px 0;
    color: #555;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.form-group label.radio-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 8px;
}

/* Loading overlay for PDF generation */
.pdf-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.pdf-loading-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pdf-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #27ae60;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.hydrant-marker {
    background-color: blue;
}

.well-marker {
    background-color: green;
}

/* Overlay controls styling */
.overlay-controls {
    display: none !important;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    border: 1px solid #ddd;
}

.overlay-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    background: white;
    cursor: pointer;
    min-width: 80px;
}

.overlay-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Export Area Styles */
.export-area-select {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.export-area-select:hover {
    background-color: #229954;
}

.export-area-select:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.large-dialog {
    max-width: 700px;
    width: 95%;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-button:hover {
    color: #2980b9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.area-list {
    max-height: 400px;
    overflow-y: auto;
}

.area-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.area-info {
    flex: 1;
}

.area-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 4px;
}

.area-details {
    font-size: 12px;
    color: #666;
}

.area-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.name-preview {
    padding: 8px;
    background: #e8f4fd;
    border-left: 3px solid #3498db;
    font-weight: bold;
    color: #2c3e50;
}

.map-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.6;
}

/* Bestätigungsdialog */
.confirm-dialog {
    max-width: 400px;
    text-align: center;
}

.confirm-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-dialog h3 {
    color: #e74c3c;
    margin-bottom: 16px;
}

.confirm-dialog p {
    color: #2c3e50;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Custom hydrant marker styles */
.custom-hydrant-marker {
    background: none !important;
    border: none !important;
}

.custom-hydrant-marker div {
    pointer-events: none;
}

/* Area label styles for PDF overview */
.area-label-centered {
    background: none !important;
    border: none !important;
}

.area-label-centered .label-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Message styling */
.message {
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}