/* SMD Kalender & Angebots-Rechner Styles */

.smd-kalender-container,
.smd-angebot-container {
    font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

/* Calendar Grid */
.smd-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.smd-calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.smd-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background-color 0.15s;
}

.smd-nav-btn:hover {
    background: #e5e7eb;
}

.smd-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1.5rem;
}

.smd-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0.5rem;
    text-transform: uppercase;
}

.smd-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    min-height: 48px;
}

.smd-day.empty {
    background: transparent;
    border: none;
}

.smd-day.available {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.smd-day.booked {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.smd-day.holiday {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.smd-day.vacation {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}

.smd-day.weekend {
    background: #f9fafb;
    color: #9ca3af;
}

.smd-day.today {
    box-shadow: 0 0 0 2px #6366f1;
}

.smd-holiday-name {
    font-size: 0.625rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Legend */
.smd-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: #4b5563;
}

.smd-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.smd-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.smd-legend-dot.available {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.smd-legend-dot.booked {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.smd-legend-dot.holiday {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

/* Angebots-Rechner */
.smd-angebot-container {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-top: 2rem;
}

.smd-angebot-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.smd-position-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.smd-position-row select,
.smd-position-row input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.smd-position-row select {
    flex: 2;
    min-width: 0;
}

.smd-position-row input[type="text"] {
    flex: 2;
    min-width: 0;
}

.smd-position-price {
    width: 80px;
    text-align: right;
    font-weight: 500;
    color: #1a1a1a;
    background: #e5e7eb;
}

.smd-remove-btn {
    padding: 0.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 0.25rem;
}

.smd-remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.smd-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: #6366f1;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.875rem;
}

.smd-add-btn:hover {
    text-decoration: underline;
}

/* Fahrtkosten Section */
.smd-fahrtkosten {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.smd-fahrtkosten-title {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.smd-fahrtkosten-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.smd-fahrtkosten-grid label {
    font-size: 0.8125rem;
    color: #4b5563;
    margin-bottom: 0.25rem;
    display: block;
}

.smd-fahrtkosten-grid input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.smd-fahrtkosten-display {
    background: #dbeafe;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    color: #1e40af;
}

/* Totals */
.smd-totals {
    background: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.smd-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.smd-totals-row.brutto {
    font-size: 1rem;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* Submit Button */
.smd-submit-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.15s;
}

.smd-submit-btn:hover {
    background: #4f46e5;
}

.smd-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Messages */
.smd-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.smd-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.smd-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 640px) {
    .smd-calendar-grid {
        gap: 2px;
    }

    .smd-day {
        min-height: 40px;
        font-size: 0.75rem;
    }

    .smd-day-header {
        font-size: 0.625rem;
    }

    .smd-position-row {
        flex-wrap: wrap;
    }

    .smd-position-row select,
    .smd-position-row input[type="text"] {
        flex: 1 1 100%;
    }

    .smd-fahrtkosten-grid {
        grid-template-columns: 1fr;
    }
}