/* ============================================
   Captive Portal - Separate CSS-Datei
   ============================================ */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
}

body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container für das gesamte Formular */
.captive-container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Logo */
.logo {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto 30px;
}

.logo.responsive {
    width: 100%;
    max-width: 200px;
}

/* Überschrift */
h1 {
    font-size: 28px;
    text-align: center;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 600;
}

h2 {
    font-size: 18px;
    text-align: center;
    color: #666;
    margin: 0 0 30px 0;
    font-weight: 400;
}

/* Formular */
form {
    width: 100%;
}

/* Floating Label Input */
.floating-label {
    position: relative;
    margin-bottom: 20px;
}

.floating-label input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.floating-label input:focus {
    border-color: #DD3333;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: -10px;
    left: 12px;
    font-size: 12px;
    color: #DD3333;
    background: white;
    padding: 0 6px;
}

.floating-label label {
    position: absolute;
    top: 14px;
    left: 16px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
}

.floating-label input::placeholder {
    color: transparent;
}

/* Button */
button[type="submit"],
.btn-primary {
    width: 100%;
    padding: 14px;
    background: #DD3333;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button[type="submit"]:hover,
.btn-primary:hover {
    background: #C02A2A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.3);
}

button[type="submit"]:active,
.btn-primary:active {
    transform: translateY(0);
}

/* Ergebnisse */
.results-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e1e5e9;
}

.results-container h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
}

.location-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.location-item {
    padding: 12px 16px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.location-item:hover {
    border-color: #DD3333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.location-item strong {
    color: #DD3333;
    font-size: 16px;
}

.location-item .subdomain {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* Fehlermeldung / Keine Treffer */
.message {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
}

.message.error,
.message.no-results {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.message.success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.message h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.message p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Link */
.btn-link {
    display: inline-block;
    padding: 12px 24px;
    background: #DD3333;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-link:hover {
    background: #C02A2A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.3);
}

.btn-link:active {
    transform: translateY(0);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 16px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .captive-container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    .floating-label input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .captive-container {
        padding: 25px 15px;
    }
    
    .logo {
        max-width: 150px;
    }
}

