/* 
  ad.css
  The foundational styling for the banners. 
  Designed to be easily exported.
*/

:root {
    --ad-bg: #ffffff;
    --ad-headline: #111827;
    --ad-body: #6b7280;
    --ad-btn-bg: #2563eb;
    --ad-btn-text: #ffffff;
    --ad-accent: #3b82f6;
    --ad-radius: 8px;
    --ad-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), inset 0 -4px 0 rgba(0,0,0,0.05);
    
    /* Internal */
    --ad-font-main: 'Inter', -apple-system, sans-serif;
    --ad-font-head: 'Outfit', sans-serif;
    
    --ad-logo-display: none;
    --ad-btn-display: inline-block;
}

.ad-container {
    position: relative;
    background-color: var(--ad-bg);
    border-radius: var(--ad-radius);
    overflow: hidden;
    box-shadow: var(--ad-shadow);
    display: flex;
    flex-direction: column;
    font-family: var(--ad-font-main);
    box-sizing: border-box;
    /* Default transitions for live preview */
    transition: background-color 0.3s ease;
}

.ad-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Background gradient overlay if needed by theme */
.ad-bg-effect {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.05) 100%);
    border-radius: var(--ad-radius);
    z-index: 1;
}

.ad-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 20px;
    justify-content: space-between;
}

.ad-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-logo {
    display: var(--ad-logo-display);
    max-height: 24px;
    max-width: 40px;
    object-fit: contain;
}

.ad-brand {
    font-size: 11px;
    font-weight: 600;
    color: var(--ad-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-subheadline {
    color: var(--ad-accent);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.ad-headline {
    color: var(--ad-headline);
    font-family: var(--ad-font-head);
    font-weight: 800;
    font-size: 24px;
    line-height: 1.1;
}

.ad-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.ad-url {
    font-size: 10px;
    color: var(--ad-body);
    opacity: 0.8;
}

.ad-btn {
    display: var(--ad-btn-display);
    background-color: var(--ad-btn-bg);
    color: var(--ad-btn-text);
    border: none;
    padding: 8px 16px;
    border-radius: calc(var(--ad-radius) * 0.75);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

/* ----------------------------------------------------
   SIZES
------------------------------------------------------- */

/* 300x250 Medium Rectangle */
.ad-300x250 {
    width: 300px;
    height: 250px;
    padding: 24px;
}

/* 336x280 Large Rectangle */
.ad-336x280 {
    width: 336px;
    height: 280px;
    padding: 28px;
}
.ad-336x280 .ad-headline { font-size: 30px; }
.ad-336x280 .ad-logo { max-height: 32px; max-width: 60px; }

/* 728x90 Leaderboard */
.ad-728x90 {
    width: 728px;
    height: 90px;
}
.ad-728x90 .ad-content {
    flex-direction: row;
    align-items: center;
    padding: 0 24px;
}
.ad-728x90 .ad-header { margin-right: 24px; width: 120px; }
.ad-728x90 .ad-main { flex-direction: row; align-items: center; gap: 24px; }
.ad-728x90 .ad-subheadline { margin: 0; }
.ad-728x90 .ad-headline { font-size: 20px; }
.ad-728x90 .ad-footer { margin-top: 0; margin-left: 24px; }
.ad-728x90 .ad-url { display: none; } /* Hide URL on tight layout */

/* 970x90 Large Leaderboard */
.ad-970x90 {
    width: 970px;
    height: 90px;
}
.ad-970x90 .ad-content {
    flex-direction: row;
    align-items: center;
    padding: 0 32px;
}
.ad-970x90 .ad-header { margin-right: 32px; width: 150px; }
.ad-970x90 .ad-main { flex-direction: row; align-items: center; gap: 32px; }
.ad-970x90 .ad-subheadline { margin: 0; font-size: 14px; }
.ad-970x90 .ad-headline { font-size: 24px; }
.ad-970x90 .ad-footer { margin-top: 0; margin-left: 32px; }

/* 468x60 Full Banner */
.ad-468x60 {
    width: 468px;
    height: 60px;
}
.ad-468x60 .ad-content {
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
}
.ad-468x60 .ad-header { 
    margin-right: 12px; 
    width: auto;
}
.ad-468x60 .ad-brand { display: none; }
.ad-468x60 .ad-logo { max-height: 24px; max-width: 60px;}
.ad-468x60 .ad-main { 
    flex-direction: row; 
    align-items: center; 
    gap: 12px; 
    flex: 1;
}
.ad-468x60 .ad-subheadline { margin: 0; font-size: 10px; }
.ad-468x60 .ad-headline { font-size: 16px; }
.ad-468x60 .ad-footer { margin-top: 0; margin-left: 16px; }
.ad-468x60 .ad-url { display: none; }
.ad-468x60 .ad-btn { padding: 6px 12px; font-size: 12px; }

/* 160x600 Wide Skyscraper */
.ad-160x600 {
    width: 160px;
    height: 600px;
    padding: 24px 16px;
}
.ad-160x600 .ad-main { justify-content: flex-start; margin-top: 60px; }
.ad-160x600 .ad-headline { font-size: 22px; margin-bottom: 40px; }
.ad-160x600 .ad-logo { max-height: 40px; max-width: 80px; margin-bottom: 8px; }
.ad-160x600 .ad-header { flex-direction: column; align-items: flex-start; }
.ad-160x600 .ad-footer { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: auto; }
.ad-160x600 .ad-btn { width: 100%; text-align: center; }

/* 300x600 Half-Page */
.ad-300x600 {
    width: 300px;
    height: 600px;
    padding: 40px 32px;
}
.ad-300x600 .ad-main { justify-content: flex-start; margin-top: 80px; }
.ad-300x600 .ad-subheadline { font-size: 16px; margin-bottom: 12px; }
.ad-300x600 .ad-headline { font-size: 40px; }
.ad-300x600 .ad-logo { max-height: 60px; max-width: 120px; margin-bottom: 12px; }
.ad-300x600 .ad-header { flex-direction: column; align-items: flex-start; }
.ad-300x600 .ad-footer { flex-direction: column; align-items: flex-start; gap: 24px; margin-top: auto; }
.ad-300x600 .ad-btn { width: 100%; text-align: center; padding: 14px; font-size: 16px; }

/* 320x50 Mobile Leaderboard */
.ad-320x50 {
    width: 320px;
    height: 50px;
}
.ad-320x50 .ad-content { flex-direction: row; align-items: center; padding: 0 12px; }
.ad-320x50 .ad-header { display: none; }
.ad-320x50 .ad-main { justify-content: center; }
.ad-320x50 .ad-subheadline { display: none; }
.ad-320x50 .ad-headline { font-size: 14px; }
.ad-320x50 .ad-footer { margin-top: 0; }
.ad-320x50 .ad-url { display: none; }
.ad-320x50 .ad-btn { padding: 4px 8px; font-size: 11px; }

/* 320x100 Large Mobile Banner */
.ad-320x100 {
    width: 320px;
    height: 100px;
}
.ad-320x100 .ad-content { flex-direction: row; align-items: center; padding: 0 16px; }
.ad-320x100 .ad-header { display: none; }
.ad-320x100 .ad-main { justify-content: center; }
.ad-320x100 .ad-subheadline { font-size: 10px; margin-bottom: 4px; }
.ad-320x100 .ad-headline { font-size: 18px; }
.ad-320x100 .ad-footer { margin-top: 0; }
.ad-320x100 .ad-url { display: none; }
.ad-320x100 .ad-btn { padding: 6px 12px; font-size: 12px; }

/* 250x250 Square */
.ad-250x250 {
    width: 250px;
    height: 250px;
    padding: 20px;
}
.ad-250x250 .ad-headline { font-size: 22px; }
.ad-250x250 .ad-subheadline { font-size: 10px; }

/* 200x200 Small Square */
.ad-200x200 {
    width: 200px;
    height: 200px;
    padding: 16px;
}
.ad-200x200 .ad-headline { font-size: 18px; }
.ad-200x200 .ad-subheadline { font-size: 9px; }
.ad-200x200 .ad-btn { padding: 6px 10px; font-size: 11px; }
.ad-200x200 .ad-url { display: none; }
