/**
 * Frontend-Styles für Opening Hours Manager
 */

/* Base Widget Styles */
.oh-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    margin: 20px 0;
}

/* Minimal Style */
.oh-widget-minimal {
    display: inline-block;
    position: relative;
    cursor: help;
}

.oh-widget-minimal .oh-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.oh-widget-minimal:hover .oh-status-indicator {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.oh-widget-minimal .oh-status-icon {
    font-size: 20px;
    display: none; /* Kein Emoji - professioneller */
}

/* Custom Tooltip für Minimal Widget */
.oh-minimal-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.oh-minimal-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.oh-widget-minimal:hover .oh-minimal-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Text-Only Style */
.oh-widget-text {
    display: inline-block;
    margin: 0;
}

.oh-text-status {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.oh-text-hours {
    font-size: 16px;
    color: #374151;
    line-height: 1.5;
}

/* Standard Style */
.oh-widget-standard {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    max-width: 500px;
}

.oh-status-header {
    padding: 20px;
    border-left: 4px solid;
}

.oh-status-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

.oh-status-icon {
    font-size: 32px;
    line-height: 1;
    display: none; /* Kein pulsierendes Emoji */
}

.oh-status-info {
    flex: 1;
}

.oh-status-main {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
}

.oh-status-message {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.oh-status-reason {
    padding: 12px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-left: 3px solid #6b7280;
    font-size: 13px;
    color: #374151;
}

.oh-status-reason strong {
    color: #111;
    font-weight: 600;
}

.oh-next-change {
    padding: 12px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Week Schedule */
.oh-widget-week {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-top: 15px;
    max-width: 500px;
}

.oh-week-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.oh-week-schedule {
    display: grid;
    gap: 12px;
}

/* Exceptions Section */
.oh-exceptions-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #f3f4f6;
}

.oh-exceptions-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oh-exceptions-list {
    display: grid;
    gap: 10px;
}

.oh-exception-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: #f9fafb;
    border-left: 3px solid #6b7280;
    border-radius: 6px;
    font-size: 14px;
}

.oh-exception-date {
    flex-shrink: 0;
    width: 90px;
    font-weight: 600;
    color: #374151;
}

.oh-exception-info {
    flex: 1;
    color: #6b7280;
}

.oh-day-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    background: #f9f9f9;
    transition: background 0.2s;
}

.oh-day-entry:hover {
    background: #f0f0f0;
}

.oh-day-today {
    background: #f0fdf4 !important;
    border: 1px solid #10b981;
}

.oh-day-today:hover {
    background: #dcfce7 !important;
}

.oh-day-name {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oh-today-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oh-day-hours {
    text-align: right;
    font-size: 14px;
    color: #666;
}

.oh-time-range {
    display: block;
    margin-bottom: 4px;
}

.oh-time-range:last-child {
    margin-bottom: 0;
}

.oh-closed-text {
    color: #999;
    font-style: italic;
}

/* Status Colors */
.oh-status-open .oh-status-main {
    color: #10b981;
}

.oh-status-closed .oh-status-main {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 600px) {
    .oh-widget {
        margin: 15px 0;
    }

    .oh-widget-standard,
    .oh-widget-week {
        max-width: 100%;
    }

    .oh-status-header {
        padding: 15px;
    }

    .oh-status-main {
        font-size: 20px;
    }

    .oh-widget-week {
        padding: 20px;
    }

    .oh-day-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .oh-day-hours {
        text-align: left;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .oh-widget-standard,
    .oh-widget-week {
        background: #1e1e1e;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .oh-status-message {
        color: #aaa;
    }

    .oh-week-title {
        color: #fff;
    }

    .oh-day-entry {
        background: #2a2a2a;
    }

    .oh-day-entry:hover {
        background: #333;
    }

    .oh-day-name {
        color: #fff;
    }

    .oh-day-hours {
        color: #aaa;
    }

    .oh-next-change {
        background: #2a2a2a;
        border-top-color: #3a3a3a;
        color: #ccc;
    }
}

/* Integration Styles */
.elementor-widget-opening-hours .oh-widget,
.wp-block-opening-hours .oh-widget {
    margin: 0;
}

/* ===========================
   WEATHER WIDGET STYLES
   =========================== */

/* Simple Weather Widget (schlicht) */
.oh-weather-simple {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    flex-wrap: nowrap;
    max-width: 100%;
}

.oh-weather-simple .oh-weather-icon {
    width: 40px !important;
    height: 40px !important;
    margin: 0;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    vertical-align: middle;
}

.oh-weather-simple .oh-weather-temp {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    white-space: nowrap;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.oh-weather-simple .oh-weather-desc {
    color: #6b7280;
    text-transform: capitalize;
    white-space: nowrap;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.oh-weather-simple .oh-weather-warning-indicator {
    margin-left: 4px;
    font-size: 18px;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Weather Widget Container (bunt, detailliert) */
.oh-weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Temperature Display */
.oh-weather-temp {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.oh-temp-value {
    font-size: 32px;
    font-weight: 700;
}

.oh-weather-description {
    font-size: 16px;
    opacity: 0.9;
    text-transform: capitalize;
}

/* Weather Warnings Section */
.oh-weather-warnings {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    backdrop-filter: blur(10px);
}

.oh-weather-warnings-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.oh-weather-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 8px;
}

.oh-weather-warning:last-child {
    margin-bottom: 0;
}

.oh-warning-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.oh-warning-message {
    font-size: 14px;
    flex: 1;
}

/* Warning Severity Levels */
.oh-warning-low {
    border-left: 3px solid #fbbf24;
}

.oh-warning-medium {
    border-left: 3px solid #f97316;
    background: rgba(249, 115, 22, 0.15);
}

.oh-warning-high {
    border-left: 3px solid #dc2626;
    background: rgba(220, 38, 38, 0.2);
    font-weight: 600;
}

/* No Warnings State */
.oh-weather-no-warnings {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.oh-weather-ok-icon {
    font-size: 24px;
}

.oh-weather-ok-message {
    font-size: 14px;
}

/* Weather Details */
.oh-weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.oh-weather-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oh-detail-label {
    font-size: 12px;
    opacity: 0.8;
}

.oh-detail-value {
    font-size: 16px;
    font-weight: 600;
}

/* Compact Weather Warnings (for integration in existing widgets) */
.oh-weather-warnings-compact {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.oh-weather-warnings-compact .oh-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
}

.oh-weather-warnings-compact .oh-warning:last-child {
    margin-bottom: 0;
}

.oh-weather-warnings-compact .oh-warning-low {
    background: #fef3c7;
    border-left-color: #fbbf24;
    color: #92400e;
}

.oh-weather-warnings-compact .oh-warning-medium {
    background: #ffedd5;
    border-left-color: #f97316;
    color: #7c2d12;
}

.oh-weather-warnings-compact .oh-warning-high {
    background: #fee2e2;
    border-left-color: #dc2626;
    color: #991b1b;
    font-weight: 600;
}

.oh-weather-warnings-compact .oh-warning-icon {
    font-size: 18px;
}

.oh-weather-warnings-compact .oh-warning-text {
    flex: 1;
}

/* Weather Widget Error States */
.oh-weather-disabled,
.oh-weather-error {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.oh-weather-disabled p,
.oh-weather-error p {
    margin: 0 0 10px 0;
}

.oh-weather-disabled p:last-child,
.oh-weather-error p:last-child {
    margin-bottom: 0;
}

.oh-weather-disabled a {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 600px) {
    .oh-weather-details {
        grid-template-columns: 1fr;
    }

    .oh-temp-value {
        font-size: 28px;
    }
}
