/* ============================================================
   denta1 CLINIC – Gäste-WLAN Portal
   Brand: Anthrazit #202124 · Bronze #87715a
   ============================================================ */

:root {
    --brand:       #87715a;
    --brand-dark:  #6e5c49;
    --brand-light: rgba(135,113,90,.12);
    --dark:        #202124;
    --gray:        #6b6b6b;
    --border:      rgba(255,255,255,.15);
    --white:       #ffffff;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Fullscreen background ── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('bg-aussen.jpg') center center / cover no-repeat;
    z-index: 0;
}

/* Dunkler Overlay mit leichtem Bronze-Schimmer */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(32,33,36,.82) 0%,
        rgba(32,33,36,.72) 50%,
        rgba(61,57,53,.85) 100%
    );
    z-index: 0;
}

/* ── Card ── */
.portal-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.portal-card {
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-radius: 1.25rem;
    border: 1px solid rgba(255,255,255,.14);
    box-shadow:
        0 2px 4px rgba(0,0,0,.2),
        0 20px 60px rgba(0,0,0,.4);
    overflow: hidden;
}

/* ── Header ── */
.portal-header {
    text-align: center;
    padding: 2.5rem 2rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    position: relative;
}

/* Bronze-Linie oben */
.portal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: var(--brand);
}

.portal-logo {
    max-height: 48px;
    max-width: 220px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Fallback-Icon */
.portal-icon {
    width: 60px;
    height: 60px;
    background: var(--brand-light);
    border: 1px solid rgba(135,113,90,.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.portal-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--brand);
}

.portal-header h1 {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin-top: .6rem;
}

.portal-subtitle { display: none; }

/* ── Body ── */
.portal-body {
    padding: 1.75rem 2rem 2rem;
}

/* ── WiFi info ── */
.wifi-info {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: .75rem;
    padding: 1rem 1.125rem;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    line-height: 1.65;
    color: rgba(255,255,255,.75);
}

.wifi-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--brand-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wifi-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--brand);
}

/* ── Access info ── */
.access-info {
    display: flex;
    gap: .625rem;
    margin-bottom: 1.5rem;
}

.access-info-item {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: .75rem;
    padding: .75rem 1rem;
    text-align: center;
}

.access-info-item .label {
    display: block;
    font-size: .68rem;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .25rem;
}

.access-info-item .value {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: var(--white);
}

/* ── Checkbox ── */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .875rem;
    color: rgba(255,255,255,.65);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin-top: .15rem;
    accent-color: var(--brand);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Button ── */
.btn-connect {
    width: 100%;
    padding: .9rem 1.5rem;
    background: var(--brand);
    color: var(--white);
    border: none;
    border-radius: .75rem;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.btn-connect:hover:not(:disabled) {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(135,113,90,.4);
}

.btn-connect:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-connect:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* ── Spinner ── */
.spinner {
    width: 17px;
    height: 17px;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alerts ── */
.alert {
    margin-top: 1rem;
    padding: .8rem 1rem;
    border-radius: .75rem;
    font-size: .875rem;
    line-height: 1.5;
}

.alert-error {
    background: rgba(153,27,27,.2);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(135,113,90,.15);
    border: 1px solid rgba(135,113,90,.3);
    color: rgba(255,255,255,.8);
}

/* ── Footer ── */
.portal-footer {
    text-align: center;
    padding: .875rem 2rem 1.25rem;
    font-size: .72rem;
    color: rgba(255,255,255,.3);
    border-top: 1px solid rgba(255,255,255,.08);
    letter-spacing: .03em;
}

/* ============================================================
   MODAL – Nutzungsbedingungen
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

@media (min-width: 480px) {
    .modal { align-items: center; }
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,12,.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: #1c1a18;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}

/* Modal-Header mit Logo */
.modal-header {
    background: var(--dark);
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Bronze-Linie oben */
.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--brand);
}

.modal-logo {
    max-height: 36px;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-bottom: .875rem;
}

.modal-header h2 {
    font-size: .8rem;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    font-size: .95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    transition: background .15s, border-color .15s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255,255,255,.12);
    border-color: var(--brand);
    color: var(--white);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    font-size: .875rem;
    color: rgba(255,255,255,.55);
    line-height: 1.75;
}

.modal-body h3 {
    font-size: .8rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 1.5rem 0 .5rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid rgba(135,113,90,.25);
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body p { margin-bottom: .5rem; }

.modal-body ul {
    padding-left: 1.25rem;
}

.modal-body ul li {
    margin-bottom: .35rem;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

/* ── Responsive ── */
@media (max-width: 380px) {
    .portal-body { padding: 1.5rem; }
    .access-info { flex-direction: column; }
    .portal-header { padding: 2rem 1.5rem 1.75rem; }
}
