/* AvisAkte – Frontend Download-Seite */

.avisakte-download-box {
    max-width: 520px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.avisakte-download-box--wide {
    max-width: 760px;
}

/* Header */
.avisakte-header {
    background: linear-gradient(135deg, #0d4f8c 0%, #1a73c5 100%);
    color: #fff;
    text-align: center;
    padding: 36px 32px 28px;
}

.avisakte-logo {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.avisakte-header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.avisakte-subtitle {
    margin: 0;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}

/* Body */
.avisakte-download-box form,
.avisakte-download-box > p,
.avisakte-files-info {
    padding: 0 32px;
}

.avisakte-download-box > .avisakte-alert:first-of-type,
.avisakte-download-box > form:first-of-type {
    margin-top: 0;
}

/* Alerts */
.avisakte-alert {
    margin: 20px 32px 0;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.avisakte-alert-error   { background: #fef2f2; border-left: 4px solid #dc2626; color: #7f1d1d; }
.avisakte-alert-warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #78350f; }
.avisakte-alert-success { background: #f0fdf4; border-left: 4px solid #16a34a; color: #14532d; }

/* Files Info */
.avisakte-files-info {
    margin: 20px 0 0;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    margin: 20px 32px 0;
}

.avisakte-files-info ul {
    margin: 6px 0 6px 20px;
    padding: 0;
}

.avisakte-files-info li {
    color: #374151;
    margin-bottom: 2px;
}

.avisakte-files-info small {
    color: #888;
}

/* Form */
.avisakte-form {
    padding: 24px 32px 8px;
}

.avisakte-field {
    margin-bottom: 18px;
}

.avisakte-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.avisakte-field input,
.avisakte-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.avisakte-field input:focus,
.avisakte-field textarea:focus {
    border-color: #1a73c5;
    box-shadow: 0 0 0 3px rgba(26,115,197,0.12);
}

/* Buttons */
.avisakte-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: #1a73c5;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-bottom: 8px;
}

.avisakte-btn:hover { background: #1558a0; }
.avisakte-btn:active { transform: scale(0.99); }

.avisakte-btn-secondary {
    background: #4b5563;
}
.avisakte-btn-secondary:hover { background: #374151; }

/* Help Text */
.avisakte-help {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    padding: 16px 32px 24px;
    margin: 0;
}

.avisakte-help a {
    color: #1a73c5;
    text-decoration: none;
}
.avisakte-help a:hover { text-decoration: underline; }

/* Ablaufdatum (klein unter Header) */
.avisakte-expiry {
    text-align: center;
    margin: 12px 32px 0;
    color: #9ca3af;
    font-size: 12px;
}

/* Dateiliste (nach Authentifizierung) */
.avisakte-file-list {
    padding: 20px 32px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avisakte-file-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.avisakte-file-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.avisakte-file-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avisakte-btn-small {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 8px 14px;
    font-size: 14px;
    flex-shrink: 0;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.dl-icon { line-height: 1; }
.dl-text  { margin-left: 4px; }

/* ZIP-Bereich */
.avisakte-zip-section {
    padding: 16px 32px 0;
}

.avisakte-btn-zip {
    background: #059669;
    text-decoration: none;
    text-align: center;
}

.avisakte-btn-zip:hover { background: #047857; color: #fff; }

/* Responsive */
@media (max-width: 600px) {
    .avisakte-download-box {
        margin: 16px;
        border-radius: 8px;
    }
    .avisakte-header { padding: 28px 20px 22px; }
    .avisakte-form,
    .avisakte-alert,
    .avisakte-help,
    .avisakte-expiry,
    .avisakte-file-list,
    .avisakte-zip-section {
        padding-left: 20px;
        padding-right: 20px;
        margin-left: 0;
        margin-right: 0;
    }

    .avisakte-file-row {
        padding: 10px 12px;
        gap: 8px;
    }

    .dl-text {
        display: none;
    }

    .avisakte-btn-small {
        padding: 8px 10px;
        font-size: 18px;
    }
}
