/* 
 * FreiesFunkNetz - Gemeinsame CSS-Stile
 * Erstellt für die PHP8-Migration
 */

/* Basis-Stile */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Überschriften */
h1, h2, h3, h4 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Header-Box für Seitentitel */
.header-box {
    background: linear-gradient(to right, #FF9900, #FFCC00);
    color: #000;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 6px;
    text-align: center;
}

/* Warnhinweise */
.warning {
    background-color: #ffeded;
    border-left: 4px solid #ff0000;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.warning h3 {
    color: #ff0000;
    margin-top: 0;
}

/* Inhaltsabschnitte */
.content-section {
    text-align: left;
    margin: 20px 0;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

/* Listen-Stile */
.rules-list {
    text-align: left;
    list-style-type: none;
    padding-left: 20px;
}

.rules-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.rules-list li:before {
    content: "•";
    color: #FF9900;
    font-size: 20px;
    position: absolute;
    left: 0;
    top: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn:hover {
    background-color: #2980b9;
}

.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-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Formular-Stile */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.form-label {
    flex: 0 0 200px;
    font-weight: bold;
    font-size: 16px;
    padding-top: 10px;
}

.form-input {
    flex: 0 0 400px;
    margin-right: 30px;
}

.form-hint {
    flex: 0 0 400px;
    margin-left: 200px;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 13px;
}

.required:after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Formulareingabefelder */
input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

select {
    height: 40px;
}

/* Checkbox-Stile */
.checkbox-container {
    margin-top: 8px;
}

.checkbox-label {
    margin-left: 10px;
    font-size: 14px;
}

/* Anmerkungen */
.note {
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
}

.note-emphasis {
    color: #e74c3c;
    font-weight: bold;
}

/* Abschnitt mit Hintergrund */
.section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-top: 30px;
    border: 1px solid #eee;
}

/* Aktionsbereich für Buttons */
.actions {
    margin-top: 30px;
    text-align: center;
}

/* Tabellen-Stile für Gateway-Informationen */
.gateway-details {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.info-table tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.info-table tr:hover {
    background-color: #f0f0f0;
}

.info-label {
    width: 35%;
    padding: 12px 15px;
    font-weight: bold;
    text-align: right;
    border-bottom: 1px solid #ddd;
    color: #2c3e50;
}

.info-value {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    color: #333;
}

/* Gateway-Liste */
.gateway-list-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.gateway-list {
    width: 100%;
    min-width: 1000px; /* Mindestbreite um Text unterzubringen */
    border-collapse: collapse;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    table-layout: fixed; /* Für bessere Kontrolle über Spaltenbreiten */
}

.gateway-list thead {
    background-color: #3498db;
    color: white;
}

.gateway-list th {
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
}

.gateway-list tbody tr {
    border-bottom: 1px solid #ddd;
}

.gateway-list tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.gateway-list tbody tr:hover {
    background-color: #f5f5f5;
}

.gateway-list td {
    padding: 10px 15px;
    word-wrap: break-word; /* Zeilenumbruch für lange Texte */
    overflow: hidden;
    text-overflow: ellipsis; /* Punkte anzeigen, wenn Text abgeschnitten wird */
}

/* Spaltenbreiten anpassen */
.gateway-list th:nth-child(1), 
.gateway-list td:nth-child(1) { /* GW-Nr */
    width: 7%;
}

.gateway-list th:nth-child(2), 
.gateway-list td:nth-child(2) { /* Land */
    width: 7%;
}

.gateway-list th:nth-child(3), 
.gateway-list td:nth-child(3) { /* Bundesland */
    width: 10%;
}

.gateway-list th:nth-child(4), 
.gateway-list td:nth-child(4) { /* KFZ */
    width: 6%;
}

.gateway-list th:nth-child(5), 
.gateway-list td:nth-child(5) { /* HF-Gateways */
    width: 15%;
}

.gateway-list th:nth-child(6), 
.gateway-list td:nth-child(6) { /* CTCSS */
    width: 10%;
}

.gateway-list th:nth-child(7), 
.gateway-list td:nth-child(7) { /* Vorname */
    width: 10%;
}

.gateway-list th:nth-child(8), 
.gateway-list td:nth-child(8) { /* Ort */
    width: 15%;
}

.gateway-list th:nth-child(9), 
.gateway-list td:nth-child(9) { /* Status */
    width: 10%;
}

.gateway-list th:nth-child(10), 
.gateway-list td:nth-child(10) { /* Aktion */
    width: 10%;
    text-align: center;
}

/* Gateway-Status Anzeigen */
.gateway-status {
    display: flex;
    align-items: center;
    font-weight: bold;
    padding: 5px;
    border-radius: 4px;
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online {
    color: #27ae60;
}

.status-online .status-indicator {
    background-color: #27ae60;
    box-shadow: 0 0 8px #27ae60;
    animation: pulse 1.5s infinite;
}

.status-offline {
    color: #e74c3c;
}

.status-offline .status-indicator {
    background-color: #e74c3c;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.online-count {
    color: #27ae60;
    font-weight: bold;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
    }
    
    .form-label {
        flex: 0 0 100%;
        margin-bottom: 8px;
    }
    
    .form-input {
        flex: 0 0 100%;
        margin-right: 0;
    }
    
    .form-hint {
        flex: 0 0 100%;
        margin-left: 0;
        margin-top: 5px;
    }
    
    .btn {
        width: 100%;
        margin: 10px 0;
    }
    
    .info-label, 
    .info-value {
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .gateway-list {
        font-size: 14px;
    }
    
    .gateway-list th,
    .gateway-list td {
        padding: 8px 10px;
    }
}