/* Styles til Text Ads Manager Pro */

/* Container layout */
.tam-ad-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 40px !important;
    width: 100% !important;
    align-items: stretch !important;
}

.tam-ad-container > .tam-ad-link {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    text-decoration: none !important;
    display: block !important;
    color: inherit !important;
}

/* Tablet - 2 kolonner */
@media (min-width: 600px) {
    .tam-ad-container > .tam-ad-link {
        flex: 0 0 calc(50% - 20px) !important;
        max-width: calc(50% - 20px) !important;
    }
}

/* Desktop - 4 kolonner */
@media (min-width: 900px) {
    .tam-ad-container > .tam-ad-link {
        flex: 0 0 calc(25% - 30px) !important;
        max-width: calc(25% - 30px) !important;
    }
}

.tam-ad {
    box-sizing: border-box !important;
    margin: 0 !important;
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.tam-ad {
    border-radius: 8px;
    border: 1px dotted #C0C0C0;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.tam-ad-link:hover .tam-ad {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.tam-ad h3, .tam-ad strong {
    margin: 0 0 10px 0;
    color: #222;
    font-size: 18px;
}

.tam-ad p {
    margin: 0 0 15px 0;
    color: #555;
    flex-grow: 1;
    line-height: 1.5;
}

/* CTA Button */
.tam-cta-button {
    display: inline-block;
    padding: 14px 28px;
    color: #fff !important;
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 16px;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 -2px 4px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.5px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--btn-color) 0%, var(--btn-color) 100%);
}

.tam-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tam-ad-link:hover .tam-cta-button::before {
    left: 100%;
}

.tam-ad-link:hover .tam-cta-button {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    filter: brightness(1.15) saturate(1.1);
}

.tam-ad-link:active .tam-cta-button {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Box layout */
.tam-box {
    border-left: 4px solid #0073aa;
    padding-left: 10px;
    background-color: #eef6fb;
}

.tam-button {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #0073aa;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.tam-button:hover {
    background-color: #005177;
}

/* Inline layout */
.tam-inline a {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    text-decoration: none;
    color: #0073aa;
}

.tam-inline a:hover {
    background-color: #d9edf7;
}

/* Widget container - vertikal visning */
.tam-widget-container .tam-ad-container {
    flex-direction: column !important;
}

.tam-widget-container .tam-ad-container > .tam-ad-link {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Mobil - forhindre overlay/fixed positioning */
@media (max-width: 768px) {
    .tam-ad-container,
    .tam-ad-link,
    .tam-ad,
    .tam-widget-container {
        position: static !important;
        bottom: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        z-index: 1 !important;
    }
}

