/* ===== Inserate (Liste, Detail) ===== */
.properties {
    padding: 3rem 0;
    min-height: 60vh;
    background-color: var(--light-bg);
}

.properties h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.properties-message {
    color: var(--text-light);
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.property-card {
    display: block;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    color: var(--text-dark);
    text-decoration: none;
    transition: box-shadow 0.3s;
}

.property-card:hover,
.property-card:focus-visible {
    box-shadow: var(--shadow-lg);
}

.property-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.property-card h3 {
    margin-bottom: 0.5rem;
}

.property-location {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.property-rent {
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.property-back {
    margin-bottom: 1rem;
}

.property-detail {
    padding: 2rem;
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.property-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 2rem;
    margin: 1.5rem 0;
}

.property-facts dt {
    color: var(--text-light);
}

.property-facts dd {
    font-weight: 500;
}

.property-detail h3 {
    margin: 1.5rem 0 0.5rem;
}

.property-description {
    white-space: pre-line;
}

.property-hint {
    margin-top: 1.5rem;
    font-style: italic;
    color: var(--text-light);
}

.property-apply {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.property-apply p {
    margin-bottom: 0.75rem;
}

.admin-heading {
    margin: 2rem 0 0.75rem;
}

.table-scroll {
    overflow-x: auto;
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    font-weight: 600;
    color: var(--text-dark);
}

.property-save {
    margin-bottom: 1rem;
}

.dashboard-list {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

/* Ungelesene Benachrichtigungen */
.notification-unread {
    font-weight: 600;
}

.notification-list li {
    margin-bottom: 0.25rem;
}

.dashboard-remove {
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
}

.dashboard .property-card p {
    margin-bottom: 0.5rem;
}

.property-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
}

.property-status {
    padding: 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.95rem;
}

.properties-feedback {
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.properties-feedback:empty {
    display: none;
}

.properties-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.properties-header h2 {
    margin-bottom: 0;
}

.property-form fieldset {
    margin-bottom: 1.5rem;
    border: none;
}

.property-form legend {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label {
    font-weight: 600;
    color: var(--text-dark);
}

.form-field input,
.form-field textarea,
.form-field select {
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Dunkleres Rot als --danger-color für ausreichenden Kontrast */
.properties-error {
    margin-top: 1rem;
    color: #b91c1c;
}

.properties-error:empty {
    display: none;
}

.property-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.375rem;
    background-color: var(--border-color);
}

.property-card .property-image {
    margin-bottom: 1rem;
}

.property-gallery {
    margin: 1.5rem 0;
}

.property-gallery-main {
    aspect-ratio: auto;
    max-height: 70vh;
    object-fit: contain;
    background-color: var(--light-bg);
}

.property-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.property-thumb {
    width: 96px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0.375rem;
    background: none;
    cursor: pointer;
}

.property-thumb:hover,
.property-thumb:focus-visible {
    border-color: var(--primary-color);
    outline: none;
}

.property-images {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.property-detail .property-images h3 {
    margin: 0 0 0.5rem;
}

.property-images .form-field {
    margin-top: 1rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Dunkleres Grün als --success-color für ausreichenden Kontrast */
.image-primary {
    font-weight: 600;
    color: #047857;
}

.property-filter {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.property-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

/* Seitennavigation der Inseratsliste */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.pagination:empty {
    display: none;
}

.pagination .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Merken-Knopf in der Inseratsliste: neben dem Karten-Link, oben rechts darübergelegt */
.property-list-item {
    position: relative;
}

.property-list-item > .property-card {
    height: 100%;
}

/* Ohne Bild steht der Titel oben; Platz für den Knopf lassen */
.property-list-item > .property-card > h3:first-child {
    padding-right: 7rem;
}

.property-list-save {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}


/* „Meine Bewerbungen“: aufgeklappte Momentaufnahme über die ganze Zeile */
.application-card-open {
    grid-column: 1 / -1;
}

.application-snapshot dd {
    overflow-wrap: anywhere;
}

/* Nachweise zu einer Bewerbung */
.application-document-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1rem;
}

.application-document-list li {
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.application-document-list .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}
