/* css/dagens-nyhet.css */

/* Hovedboks med 3D-effekt og video/audio støtte */
.tulleavisa-dagens-nyhet-box {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 1em auto;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    cursor: pointer;
    perspective: 1000px;
    font-family: Arial, sans-serif;
}

.tulleavisa-dagens-nyhet-box:hover {
    transform: rotateY(10deg) rotateX(5deg);
    box-shadow: 0 15px 25px rgba(0,0,0,0.5);
}

.tulleavisa-dagens-nyhet-bg {
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    position: relative;
}

.tulleavisa-bg-video,
.tulleavisa-bg-audio {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.tulleavisa-bg-audio {
    height: auto;
}

.tulleavisa-dagens-nyhet-content {
    background: rgba(255, 192, 203, 0.7);
    padding: 15px 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    color: #3a003a;
    position: relative;
    z-index: 2;
}

.tulleavisa-dagens-nyhet-header {
    font-weight: bold;
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

.tulleavisa-dagens-nyhet-title {
    font-weight: 800;
    font-size: 1.6em;
    margin-bottom: 0.3em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    color: #ffffff;
    line-height: 1.2;
}

.tulleavisa-dagens-nyhet-excerpt {
    font-size: 1em;
    margin-bottom: 1em;
}

.tulleavisa-dagens-nyhet-read-time {
    font-style: italic;
    margin-bottom: 1em;
}

.tulleavisa-dagens-nyhet-link a {
    color: #900c3f;
    text-decoration: underline;
    font-weight: 600;
}

.tulleavisa-dagens-nyhet-hot-icon {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 30px;
    height: 30px;
    z-index: 10;
    pointer-events: none;
}

.tulleavisa-dagens-nyhet-share {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}

.tulleavisa-dagens-nyhet-share a {
    text-decoration: none;
    color: #ffde59;
    font-weight: bold;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.tulleavisa-dagens-nyhet-share a:hover {
    color: #ffffff;
    transform: scale(1.1);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

.tulleavisa-dagens-nyhet-share svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tulleavisa-dagens-nyhet-reactions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.tulleavisa-reaction-btn {
    font-size: 1.5em;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.7));
}

.tulleavisa-reaction-btn:hover {
    transform: scale(1.3);
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.9)) brightness(1.2);
}

.tulleavisa-visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

/* Kompakt boks for fallback og mindre versjon */
.tulleavisa-nyhet-boks {
    max-width: 100%;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    margin: 0 auto;
}

.tulleavisa-fallback-svg {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #6a4c93, #8c52ff);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.tulleavisa-nyhet-innhold {
    background: rgba(106, 76, 147, 0.8);
    border-radius: 0 0 15px 15px;
    padding: 15px;
}

.tulleavisa-nyhet-header {
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tulleavisa-nyhet-reactions-compact button {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.8));
}

.tulleavisa-nyhet-reactions-compact button:hover {
    transform: scale(1.4);
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.9)) brightness(1.3);
}

.tulleavisa-nyhet-tittel {
    margin: 10px 0 5px;
    font-size: 1.6rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    color: #ffffff;
    line-height: 1.2;
}

.tulleavisa-nyhet-ingress {
    font-size: 0.9rem;
    line-height: 1.3;
}

.tulleavisa-nyhet-lesmer {
    display: inline-block;
    margin-top: 10px;
    color: #ffde59;
    text-decoration: none;
    font-weight: bold;
}

.tulleavisa-nyhet-lesmer:hover {
    text-decoration: underline;
}
.tulleavisa-reaction-active {
    transform: scale(1.3);
    transition: transform 0.3s ease;
}

.tulleavisa-toast {
    /* Styles set inline i JS */
}
.tulleavisa-reaction-btn:hover {
  box-shadow: 0 0 8px 2px #e60073;
  transition: box-shadow 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tulleavisa-dagens-nyhet-box,
    .tulleavisa-nyhet-boks {
        max-width: 100% !important;
        width: calc(100% - 2em) !important;
        margin: 1em !important;
    }
    
    /* Higher specificity for Elementor conflicts */
    .elementor-widget-container .tulleavisa-dagens-nyhet-box,
    .elementor-widget-container .tulleavisa-nyhet-boks,
    [class*="elementor-"] .tulleavisa-dagens-nyhet-box,
    [class*="elementor-"] .tulleavisa-nyhet-boks {
        max-width: 100% !important;
        width: 100% !important;
        margin: 1em auto !important;
    }
    
    .tulleavisa-dagens-nyhet-box {
        transform-style: flat;
    }
    
    .tulleavisa-dagens-nyhet-box:hover {
        transform: none;
    }
    
    .tulleavisa-dagens-nyhet-title {
        font-size: 1.4em;
    }
    
    .tulleavisa-nyhet-tittel {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .tulleavisa-dagens-nyhet-box,
    .tulleavisa-nyhet-boks {
        width: calc(100% - 1em);
        margin: 0.5em;
        padding: 15px;
    }
    
    .tulleavisa-dagens-nyhet-content {
        padding: 12px 15px;
    }
    
    .tulleavisa-dagens-nyhet-title {
        font-size: 1.3em;
        line-height: 1.3;
    }
    
    .tulleavisa-nyhet-tittel {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .tulleavisa-dagens-nyhet-share {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tulleavisa-dagens-nyhet-share a {
        font-size: 1.1em;
    }
}

@media (max-width: 320px) {
    .tulleavisa-nyhet-boks {
        max-width: calc(100vw - 20px);
        width: calc(100vw - 20px);
        margin: 10px;
        padding: 12px;
    }
    
    .tulleavisa-dagens-nyhet-title,
    .tulleavisa-nyhet-tittel {
        font-size: 1.2rem;
    }
}
