/**
 * Terminbestätigung - Styling
 *
 * @package tierarzt-theme
 */

.terminbestaetigung-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.terminbestaetigung-container h1,
.terminbestaetigung-container h2 {
    margin-top: 0;
    color: #333;
}

.terminbestaetigung-container h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 1rem;
}

.terminanfrage-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.admin-notice {
    display: inline-block;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: bold;
}

.appointment-info {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.admin-info {
    font-size: 0.9rem;
    line-height: 1.8;
}

.admin-info p {
    margin: 0.5rem 0;
}

/* Form Structure */
.terminbestaetigung-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.terminanfrage-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1.5rem;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.terminanfrage-section legend {
    font-weight: 600;
    font-size: 1.1em;
    color: #0073aa;
    padding: 0 0.5rem;
    margin-left: -0.5rem;
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
    user-select: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.radio-label:hover {
    background: #f5f5f5;
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: #0073aa;
}

/* Form Groups */
.form-group {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group textarea,
.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

#char-count {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-primary {
    background: #0073aa;
    color: white;
    width: 100%;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: #005a87;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.button-group .btn {
    margin-top: 0;
    width: 100%;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
}

.status-new {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-expired {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Terminbestätigung Display (2026-07-09) */
/* Anzeige der drei verschiedenen Terminangaben */

.terminbestaetigung-display {
    max-width: 700px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.terminbestaetigung-header {
    margin-bottom: 2rem;
}

.terminbestaetigung-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0 0 1rem 0;
    border-bottom: 3px solid #0073aa;
    padding-bottom: 1rem;
}

.terminbestaetigung-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.terminbestaetigung-status {
    font-weight: bold;
    color: #155724;
    font-size: 1.1rem;
    margin: 0;
}

.terminbestaetigung-confirmed-date {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Sections */
.terminbestaetigung-section {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.terminbestaetigung-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0073aa;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminbestaetigung-info-icon {
    font-size: 1.1rem;
    color: #0073aa;
    cursor: help;
}

/* Appointment Details */
.terminbestaetigung-appointment-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.terminbestaetigung-appointment-date,
.terminbestaetigung-appointment-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.terminbestaetigung-appointment-date strong,
.terminbestaetigung-appointment-time strong {
    color: #333;
    font-weight: 600;
    min-width: 80px;
}

.terminbestaetigung-appointment-date span,
.terminbestaetigung-appointment-time span {
    color: #555;
    font-weight: 500;
}

/* Abweichender Ist-Termin (Warning) */
.terminbestaetigung-current-divergent {
    border: 2px solid #ff9800 !important;
    background-color: #fff3cd !important;
    border-radius: 6px !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.terminbestaetigung-current-divergent .terminbestaetigung-section-title {
    color: #ff6f00;
    font-weight: 700;
}

.terminbestaetigung-current-icon {
    display: inline-block;
    font-size: 1.3rem;
    color: #ff9800;
    margin-right: 0.5rem;
}

.terminbestaetigung-current-title {
    display: flex;
    align-items: center;
}

.terminbestaetigung-current-notice {
    background-color: #ffe8b6;
    border-left: 4px solid #ff9800;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    color: #ff6f00;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

/* Client Comment */
.terminbestaetigung-client-comment {
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 1rem;
    border-radius: 4px;
    line-height: 1.6;
    color: #555;
}

.terminbestaetigung-client-comment p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 600px) {
    .terminbestaetigung-display {
        margin: 1rem auto;
    }

    .terminbestaetigung-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .terminbestaetigung-appointment-date,
    .terminbestaetigung-appointment-time {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .terminbestaetigung-header h2 {
        font-size: 1.4rem;
    }
}

/* Audit Table */
.audit-log {
    overflow-x: auto;
    margin-top: 1rem;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.audit-table th {
    background: #f0f0f0;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: #333;
}

.audit-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
    word-break: break-word;
}

.audit-table tr:hover {
    background: #f9f9f9;
}

.audit-table small {
    color: #666;
    font-size: 0.8rem;
}

/* Result Message */
.result-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 500;
}

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

.result-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Admin-Interface Styling (2026-07-09) */

.terminbestaetigung-admin-view {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.terminbestaetigung-admin-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 1.5rem;
}

.terminbestaetigung-admin-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 0 0 1rem 0;
}

.terminbestaetigung-admin-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.meta-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.meta-value {
    color: #333;
    font-weight: 500;
}

/* Admin Sections */
.terminbestaetigung-admin-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.terminbestaetigung-admin-section h3 {
    font-size: 1.2rem;
    color: #0073aa;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.terminbestaetigung-admin-section h4 {
    font-size: 1rem;
    color: #333;
    margin: 1rem 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Appointment Boxes */
.appointment-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.appointment-box h4 {
    margin-top: 0;
}

.appointment-box p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* Divergent Appointment Warning */
.appointment-divergent {
    background: #fff3cd !important;
    border: 2px solid #ff9800 !important;
    border-left: 4px solid #ff9800 !important;
}

.appointment-divergent h4 {
    color: #ff6f00;
    font-weight: 700;
}

.divergent-icon {
    font-size: 1.2rem;
    color: #ff9800;
}

.divergent-notice {
    background: #ffe8b6;
    border-left: 4px solid #ff9800;
    padding: 0.75rem;
    margin: 0.75rem 0;
    border-radius: 4px;
    color: #ff6f00;
    font-weight: 600;
}

.warning-badge {
    display: inline-block;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #ff6f00;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 1rem;
    font-weight: 600;
}

/* Customer Info */
.customer-info {
    background: #fff;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
}

.customer-info p {
    margin: 0.5rem 0;
}

.customer-info a {
    color: #0073aa;
    text-decoration: none;
}

.customer-info a:hover {
    text-decoration: underline;
}

/* Admin Notes */
.admin-notes-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
}

.admin-notes-display {
    line-height: 1.6;
    color: #555;
}

.empty-notes {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* Audit Table Styling in Admin */
.terminbestaetigung-admin-section .audit-table {
    background: #fff;
    margin-top: 1rem;
}

.audit-action {
    display: inline-block;
    background: #e7f3ff;
    color: #0073aa;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Responsive Admin View */
@media (max-width: 768px) {
    .terminbestaetigung-admin-meta {
        grid-template-columns: 1fr;
    }

    .terminbestaetigung-admin-view {
        padding: 1rem;
    }

    .terminbestaetigung-admin-section {
        padding: 1rem;
    }

    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

.result-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success Section */
.terminbestaetigung-success-section {
    padding: 0;
}

.success-card {
    background: white;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.success-card h1 {
    margin: 0 0 1rem 0;
    color: #155724;
    font-size: 1.8rem;
}

.success-message {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.success-card .appointment-info {
    text-align: left;
    background: #f0f8ff;
    border-left-color: #2196F3;
}

.confirmation-details {
    background: #e7f3ff;
    border: 1px solid #2196F3;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: left;
}

.client-note {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    text-align: left;
}

.client-note strong {
    display: block;
    margin-bottom: 0.5rem;
}

.action-buttons {
    margin-top: 2rem;
    text-align: center;
}

.action-buttons .btn {
    margin: 0 0.5rem;
}

/* Error Section */
.terminbestaetigung-error-section {
    padding: 0;
}

.error-card {
    background: white;
    border-radius: 8px;
    padding: 2.5rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #dc3545;
    text-align: center;
}

.error-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.error-card h1 {
    margin: 0 0 1rem 0;
    color: #721c24;
    font-size: 1.8rem;
}

.error-message {
    font-size: 1.05rem;
    color: #721c24;
    margin-bottom: 1.5rem;
}

.contact-info {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 4px;
    color: #721c24;
}

/* Form Section */
.terminbestaetigung-form-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.terminbestaetigung-form-section h1 {
    margin-top: 0;
    color: #155724;
}

/* Responsive */
@media (max-width: 768px) {
    .terminbestaetigung-container {
        margin: 1rem;
        padding: 1rem;
    }

    .btn {
        width: 100%;
        margin-top: 0.75rem;
        margin-right: 0;
    }

    .button-group .btn {
        margin-bottom: 0.5rem;
    }

    .audit-table {
        font-size: 0.75rem;
    }

    .audit-table th,
    .audit-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .terminbestaetigung-container {
        margin: 0;
        border-radius: 0;
    }

    .terminbestaetigung-container h1 {
        font-size: 1.25rem;
    }

    .appointment-info {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .radio-label {
        padding: 0.5rem;
    }
}
