/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Nachrichtenmodal im Card-Design */
.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 0;
        border: 2px solid #1a4a8a;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease-out;
}

/* Mobile Zentrierung für Nachrichtenmodal */
@media (max-width: 782px) {
    .modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        width: 90%;
        max-width: 500px;
        max-height: 80vh;
    }
    
    @keyframes slideDown {
        from {
            transform: translate(-50%, -60%);
            opacity: 0;
        }
        to {
            transform: translate(-50%, -50%);
            opacity: 1;
        }
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header im Card-Design */
.modal-content h2 {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 20px 20px 15px;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.modal-content h2::before {
    content: "\f466"; /* dashicons-email */
    font-family: dashicons;
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    color: #2271b1;
}

/* Close Button im Card-Design */
.modal-content .close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
}

.modal-content .close:hover,
.modal-content .close:focus {
    color: #d63638;
}

/* Form Content im Card-Design */
.modal-content form {
    padding: 20px;
}

/* Form Fields im Card-Design */
.modal-content .form-field {
    margin-bottom: 20px;
}

.modal-content .form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.modal-content .form-field input[type="text"],
.modal-content .form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.modal-content .form-field input[type="text"]:focus,
.modal-content .form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.modal-content .form-field textarea {
    min-height: 120px;
    resize: vertical;
}

/* Submit Button im Card-Design */
.modal-content .button.button-primary,
.modal-content button.button-primary {
    background: linear-gradient(135deg, #667eea 0%, #20c997 100%) !important;
    border: none !important;
    padding: 12px 28px;
    margin-top: 0px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px #97a5e6;
    color: #fff !important;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.modal-content .button.button-primary:hover,
.modal-content button.button-primary:hover {
    background: linear-gradient(135deg, #20c997 0%, #667eea 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px #8090d6;
}

.modal-content .button.button-primary:active,
.modal-content button.button-primary:active {
    transform: translateY(0);
}

.modal-content .button.button-primary:disabled,
.modal-content button.button-primary:disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Reservierung Details */
.reservierung-details {
    width: 100%;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-tile {
    background: white;
    border-radius: 8px;
        border: 2px solid #1a4a8a;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.detail-tile:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-tile.tile-full {
    grid-column: 1 / -1;
}

.tile-header {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tile-header .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.tile-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.tile-content {
    padding: 16px;
}

.tile-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.tile-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tile-label {
    font-weight: 600;
    color: #555;
    min-width: 40%;
    flex-shrink: 0;
}

.tile-value {
    color: #333;
    text-align: right;
    word-break: break-word;
}

.tile-value a {
    color: #2271b1;
    text-decoration: none;
}

.tile-value a:hover {
    text-decoration: underline;
}

.tile-full-item {
    flex-direction: column;
    justify-content: flex-start;
}

.tile-full-item .tile-value {
    text-align: left;
    margin-top: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tile-center {
    justify-content: center;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

.status-badge.status-ausstehend {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.status-bestätigt {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.status-abgelehnt {
    background-color: #f8d7da;
    color: #721c24;
}

/* Aktionen Tile */
.detail-tile.tile-actions {
    background: #f5f5f5;
}

.detail-tile.tile-actions .tile-header {
    background: linear-gradient(135deg, #333 0%, #555 100%);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.action-tile-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px !important;
    font-size: 13px !important;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.action-tile-button.button {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    color: #333;
}

.action-tile-button.button:hover {
    background-color: #e5e5e5;
    border-color: #999;
}

.action-tile-button.button-primary {
    background-color: #2271b1;
    border-color: #2271b1;
    color: white;
}

.action-tile-button.button-primary:hover {
    background-color: #135e96;
    border-color: #135e96;
}

.action-tile-button.bestätigen-button {
    background-color: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724 !important;
}

.action-tile-button.bestätigen-button:hover {
    background-color: #c3e6cb !important;
}

.action-tile-button.ablehnen-button {
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

.action-tile-button.ablehnen-button:hover {
    background-color: #f5c6cb !important;
}

.action-tile-button.löschen-button {
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}

.action-tile-button.löschen-button:hover {
    background-color: #f5c6cb !important;
}

.action-tile-button .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .action-tile-button {
        width: 100%;
        justify-content: center;
    }

    .tile-item {
        flex-direction: column;
    }

    .tile-value {
        text-align: left;
        margin-top: 4px;
    }
}

/* Close Button Mobile */
@media (max-width: 480px) {
    .modal-content h2 {
        font-size: 18px;
    }

    .tile-header h3 {
        font-size: 12px;
    }

    .action-tile-button {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}
