/**
 * SMG Directions Widget Styles
 * 
 * Moderne Anfahrt-Widget Styles im SUMA Design
 * Basierend auf der bestehenden Farbpalette und dem Theme
 */

/* ========================================
   WIDGET CONTAINER
   ======================================== */
.smg-directions-widget {
    width: 100%;
    max-width: var(--widget-max-width, 1400px);
    margin: 0 auto;
    padding: var(--space-2xl) 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', system-ui, sans-serif;
}

/* ========================================
   HEADER SECTION
   ======================================== */
.smg-directions-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.smg-directions-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--smg-600);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.smg-contact-section {
    margin-bottom: var(--space-3xl);
    background: var(--app-white);
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: var(--shadow-md);
}

.smg-contact-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.smg-contact-company {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--smg-600);
    margin: 0;
    line-height: 1.3;
}

.smg-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.smg-contact-card {
    background: var(--app-gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.3s ease;
}

.smg-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Manager Card */
.smg-manager-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--app-gray-50), var(--app-white));
}

.smg-manager-image {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.smg-manager-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.smg-manager-info {
    width: 100%;
}

.smg-manager-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--smg-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.smg-manager-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--app-gray-900);
}

/* Contact Info Cards */
.smg-contact-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--app-gray-900);
    margin: 0 0 var(--space-md) 0;
}

.smg-contact-subtitle {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--app-gray-700);
    margin-bottom: var(--space-sm);
    margin-top: var(--space-md);
}

.smg-contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.smg-contact-item {
    font-size: var(--text-sm);
    color: var(--app-gray-600);
    line-height: 1.6;
}

.smg-contact-label {
    font-weight: 600;
    color: var(--app-gray-700);
}

.smg-contact-value {
    color: var(--app-gray-600);
}

.smg-contact-methods {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--app-gray-200);
}

.smg-contact-link {
    color: var(--smg-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.smg-contact-link:hover {
    color: var(--smg-700);
    text-decoration: underline;
}

/* Contact Footer */
.smg-contact-footer {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--app-gray-200);
}

.smg-company-logo {
    max-width: 150px;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .smg-contact-grid {
        grid-template-columns: 1fr;
    }

    .smg-contact-section {
        padding: var(--space-xl);
    }
}

/* ========================================
   MAP SECTION
   ======================================== */
.smg-directions-map-section {
    margin-bottom: var(--space-3xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--app-white);
}

.smg-directions-map {
    width: 100%;
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.smg-directions-map iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-lg);
}

.smg-directions-map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--app-gray-100), var(--app-gray-50));
    border: 2px dashed var(--app-gray-300);
    border-radius: var(--radius-lg);
}

.map-placeholder-content {
    text-align: center;
    color: var(--app-gray-600);
}

.map-placeholder-content i {
    font-size: 3rem;
    color: var(--smg-500);
    margin-bottom: var(--space-md);
}

.map-placeholder-content p {
    margin: var(--space-sm) 0;
    font-weight: 500;
}

.map-address {
    font-size: var(--text-sm);
    color: var(--smg-600);
    font-weight: 600;
}

/* ========================================
   TRANSPORT SECTIONS
   ======================================== */
.smg-directions-transport-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.smg-transport-section {
    background: var(--app-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--app-gray-200);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.smg-transport-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--smg-500), var(--smg-400));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.smg-transport-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--smg-300);
}

.smg-transport-section:hover::before {
    opacity: 1;
}

/* ========================================
   TRANSPORT HEADERS
   ======================================== */
.smg-transport-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.smg-transport-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--smg-500), var(--smg-600));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.smg-transport-icon svg {
    width: 32px;
    height: 32px;
    color: var(--app-white);
}

/* SVG Icons als <img> - weiß einfärben wie bei Services */
.smg-transport-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    /* SVG-spezifischer Filter für weiße Farbe */
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(103%) contrast(103%);
}

/* Fallback für Elementor Icons */
.smg-transport-icon i {
    font-size: 32px;
    color: var(--app-white);
}

.smg-transport-header-content {
    flex: 1;
}

.smg-transport-header h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--app-gray-800);
    margin: 0 0 var(--space-md) 0;
    letter-spacing: -0.01em;
}

/* ========================================
   TRANSPORT CONTENT
   ======================================== */
.smg-transport-content {
    color: var(--app-gray-700);
    line-height: 1.7;
}

.smg-direction-item {
    margin-bottom: var(--space-lg);
}

.smg-direction-item:last-child {
    margin-bottom: 0;
}

.smg-direction-item h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--smg-600);
    margin: 0 0 var(--space-sm) 0;
}

.smg-direction-item p {
    margin: 0;
    font-size: var(--text-base);
    line-height: 1.7;
}

.smg-bus-stations {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 0 0;
}

.smg-bus-stations li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
    border-bottom: 1px solid var(--app-gray-100);
}

.smg-bus-stations li:last-child {
    border-bottom: none;
}

.smg-bus-stations li::before {
    content: '🚌';
    position: absolute;
    left: 0;
    top: var(--space-sm);
    font-size: var(--text-sm);
}

/* ========================================
   DOWNLOAD SECTION
   ======================================== */
.smg-directions-downloads {
    background: var(--app-gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--app-gray-200);
}

.smg-download-info {
    font-size: var(--text-lg);
    color: var(--app-gray-700);
    margin: 0 0 var(--space-lg) 0;
    font-weight: 500;
}

.smg-download-links {
    display: grid;
    gap: var(--space-md);
}

.smg-download-item {
    display: block;
}

.smg-download-link,
.smg-download-placeholder {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--app-white);
    border: 1px solid var(--app-gray-300);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--app-gray-800);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.smg-download-link:hover {
    background: var(--smg-50);
    border-color: var(--smg-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.smg-download-placeholder {
    opacity: 0.6;
    cursor: not-allowed;
}

.smg-pdf-icon {
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.smg-download-text {
    flex: 1;
    font-weight: 500;
    font-size: var(--text-base);
}

.smg-download-label {
    font-size: var(--text-sm);
    color: var(--smg-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   LIVE DEPARTURES SECTION
   ======================================== */
.smg-directions-live-departures {
    background: var(--app-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-3xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--app-gray-200);
    position: relative;
    overflow: hidden;
}

.smg-directions-live-departures::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    opacity: 0.8;
}

.smg-live-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--app-gray-200);
}

.smg-live-title-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.smg-live-header h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--app-gray-800);
    margin: 0;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--app-gray-400);
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.status-indicator.live {
    background: #4CAF50;
}

.status-indicator.error {
    background: var(--smg-500);
    animation: none;
}

.smg-departure-stations {
    display: grid;
    gap: var(--space-lg);
}

.smg-departure-station {
    border: 1px solid var(--app-gray-200);
    border-radius: var(--radius);
    padding: var(--space-lg);
    background: var(--app-gray-50);
    transition: all var(--transition-normal);
}

.smg-departure-station:hover {
    border-color: var(--smg-300);
    background: var(--app-white);
}

.station-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.station-header h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--smg-600);
    margin: 0;
}

.station-lines {
    background: var(--smg-600);
    color: var(--app-white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
}

.departures-list {
    min-height: 60px;
}

.departure-loading {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--app-gray-600);
    font-size: var(--text-sm);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--app-gray-300);
    border-top: 2px solid var(--smg-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.departure-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--app-gray-200);
}

.departure-item:last-child {
    border-bottom: none;
}

.departure-line {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.line-number {
    background: var(--smg-600);
    color: var(--app-white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: var(--text-sm);
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.line-number.u-bahn {
    background: #1976D2;
}

.line-number.bus {
    background: #FF8F00;
}

.departure-destination {
    font-weight: 500;
    color: var(--app-gray-700);
}

.departure-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.departure-minutes {
    font-weight: 600;
    color: var(--smg-600);
    font-size: var(--text-lg);
}

.departure-absolute {
    font-size: var(--text-xs);
    color: var(--app-gray-500);
}

.smg-live-footer {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--app-gray-200);
    text-align: center;
    color: var(--app-gray-500);
}

.update-time {
    font-weight: 500;
}

/* Additional animations for Live Departures */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   CARD STYLE VARIATIONS
   ======================================== */

/* Modern Style (Default) */
.smg-directions-modern {
    /* Already defined above */
}

/* Classic Style */
.smg-directions-classic .smg-transport-section {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.smg-directions-classic .smg-transport-icon {
    border-radius: var(--radius-sm);
    background: var(--smg-600);
}

.smg-directions-classic .smg-directions-map-section {
    border-radius: var(--radius-sm);
}

/* Minimal Style */
.smg-directions-minimal .smg-transport-section {
    background: transparent;
    border: 1px solid var(--app-gray-300);
    box-shadow: none;
    border-radius: var(--radius-sm);
}

.smg-directions-minimal .smg-transport-section:hover {
    background: var(--app-white);
    box-shadow: var(--shadow-sm);
}

.smg-directions-minimal .smg-transport-icon {
    background: var(--app-gray-100);
    color: var(--smg-600);
}

.smg-directions-minimal .smg-transport-icon svg {
    color: var(--smg-600);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.smg-animate-fade-up {
    animation: fadeUp 0.6s ease-out;
}

.smg-animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.smg-animate-slide-left {
    animation: slideLeft 0.6s ease-out;
}

.smg-animate-zoom-in {
    animation: zoomIn 0.6s ease-out;
}

/* Staggered animations for child elements */
.smg-animate-fade-up .smg-transport-section {
    animation: fadeUp 0.6s ease-out;
    animation-fill-mode: both;
}

.smg-animate-fade-up .smg-transport-section:nth-child(1) {
    animation-delay: 0.1s;
}

.smg-animate-fade-up .smg-transport-section:nth-child(2) {
    animation-delay: 0.2s;
}

.smg-animate-fade-up .smg-transport-section:nth-child(3) {
    animation-delay: 0.3s;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (min-width: 768px) {
    .smg-directions-transport-sections {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .smg-download-links {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .smg-directions-transport-sections {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .smg-download-links {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .smg-directions-widget {
        padding: var(--space-xl) var(--space-md);
    }
    
    .smg-directions-title {
        font-size: var(--text-2xl);
    }
    
    .smg-transport-section {
        padding: var(--space-lg);
    }
    
    .smg-transport-header {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .smg-transport-header h3 {
        font-size: var(--text-lg);
    }
    
    .smg-directions-downloads {
        padding: var(--space-lg);
    }
    
    .smg-download-links {
        grid-template-columns: 1fr;
    }
    
    .smg-download-link,
    .smg-download-placeholder {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .smg-directions-widget,
    .smg-transport-section,
    .smg-download-link {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus states for keyboard navigation */
.smg-download-link:focus {
    outline: 2px solid var(--smg-500);
    outline-offset: 2px;
} 