/* =====================================================
   Promotional Asset Template Styles
   These styles are used in the generated assets
   ===================================================== */

/* Base Template Reset */
.promo-template {
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.promo-template * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Background Layer */
.promo-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.promo-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        var(--dark-color) 0%, 
        var(--mid-color) 50%, 
        var(--dark-color) 100%
    );
}

/* Content Container */
.promo-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--content-padding, 5%);
}

/* Date/Day Pill */
.promo-date-pill {
    display: inline-block;
    background: var(--accent-color);
    color: var(--light-text);
    padding: 0.6em 1.5em;
    border-radius: 100px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: var(--date-font-size, 1em);
    text-align: center;
    align-self: center;
}

/* Time Pill */
.promo-time-pill {
    display: inline-block;
    background: #ffffff;
    color: var(--dark-text);
    padding: 0.4em 1.2em;
    border-radius: 100px;
    font-weight: 600;
    font-size: var(--time-font-size, 0.8em);
    margin-top: 0.5em;
    text-align: center;
    align-self: center;
}

/* Promotional Image */
.promo-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 1em 0;
}

.promo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.promo-image-wide {
    width: 100%;
    height: auto;
}

/* Promo Object (Draggable) */
.promo-object-element {
    position: absolute;
    max-width: 40%;
    max-height: 40%;
    object-fit: contain;
    pointer-events: none;
}

/* Text Section */
.promo-text-section {
    text-align: center;
    padding: 0 5%;
}

.promo-intro {
    color: var(--light-text);
    font-size: var(--intro-font-size, 1em);
    font-weight: 500;
    margin-bottom: 0.3em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.promo-reward {
    color: var(--accent-color);
    font-size: var(--reward-font-size, 2.5em);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 0.2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.promo-explainer {
    color: var(--light-text);
    font-size: var(--explainer-font-size, 0.9em);
    line-height: 1.4;
    margin-bottom: 0.5em;
}

.promo-additional {
    color: var(--light-text);
    font-size: var(--additional-font-size, 0.75em);
    opacity: 0.9;
    line-height: 1.3;
}

/* Disclaimer */
.promo-disclaimer {
    color: var(--light-text);
    font-size: var(--disclaimer-font-size, 0.5em);
    opacity: 0.7;
    text-align: center;
    margin-top: auto;
    padding-top: 1em;
    line-height: 1.3;
}

/* Footer (Facebook & URL) */
.promo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8em 0 0;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.promo-facebook {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: var(--light-text);
    font-size: var(--footer-font-size, 0.7em);
}

.promo-facebook-icon {
    width: 1.5em;
    height: 1.5em;
}

.promo-url {
    color: var(--light-text);
    font-size: var(--footer-font-size, 0.7em);
    font-weight: 600;
}

/* =====================================================
   Size-Specific Adjustments
   ===================================================== */

/* Large Print (Poster, Backdrop) */
.promo-template.size-large {
    --content-padding: 4%;
    --date-font-size: 2em;
    --time-font-size: 1.2em;
    --intro-font-size: 1.5em;
    --reward-font-size: 4em;
    --explainer-font-size: 1.2em;
    --additional-font-size: 1em;
    --disclaimer-font-size: 0.7em;
    --footer-font-size: 0.9em;
}

/* Medium Print (Rack Cards) */
.promo-template.size-medium {
    --content-padding: 5%;
    --date-font-size: 1em;
    --time-font-size: 0.7em;
    --intro-font-size: 0.8em;
    --reward-font-size: 1.8em;
    --explainer-font-size: 0.65em;
    --additional-font-size: 0.55em;
    --disclaimer-font-size: 0.4em;
    --footer-font-size: 0.5em;
}

/* Large Digital (1920x1080, 3000x1030) */
.promo-template.size-digital-large {
    --content-padding: 3%;
    --date-font-size: 1.5em;
    --time-font-size: 1em;
    --intro-font-size: 1.2em;
    --reward-font-size: 3em;
    --explainer-font-size: 1em;
    --additional-font-size: 0.8em;
    --disclaimer-font-size: 0.6em;
    --footer-font-size: 0.7em;
}

/* Medium Digital */
.promo-template.size-digital-medium {
    --content-padding: 4%;
    --date-font-size: 0.9em;
    --time-font-size: 0.6em;
    --intro-font-size: 0.7em;
    --reward-font-size: 1.5em;
    --explainer-font-size: 0.55em;
    --additional-font-size: 0.45em;
    --disclaimer-font-size: 0.35em;
    --footer-font-size: 0.4em;
}

/* Small Digital (banners) */
.promo-template.size-digital-small {
    --content-padding: 3%;
    --date-font-size: 0.6em;
    --time-font-size: 0.4em;
    --intro-font-size: 0.5em;
    --reward-font-size: 1em;
    --explainer-font-size: 0.4em;
    --additional-font-size: 0em; /* Hide on small */
    --disclaimer-font-size: 0em; /* Hide on small */
    --footer-font-size: 0.35em;
}

/* Tiny banners (728x90, 320x50) */
.promo-template.size-banner {
    --content-padding: 2%;
}

.promo-template.size-banner .promo-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.promo-template.size-banner .promo-image-container {
    flex: 0 0 auto;
    width: 20%;
    margin: 0;
}

.promo-template.size-banner .promo-text-section {
    flex: 1;
    text-align: left;
    padding: 0 1em;
}

.promo-template.size-banner .promo-date-pill,
.promo-template.size-banner .promo-time-pill {
    display: inline;
    padding: 0.2em 0.5em;
    font-size: 0.5em;
    margin-right: 0.5em;
}

.promo-template.size-banner .promo-reward {
    font-size: 1.2em;
    margin: 0;
}

.promo-template.size-banner .promo-intro,
.promo-template.size-banner .promo-explainer,
.promo-template.size-banner .promo-additional,
.promo-template.size-banner .promo-disclaimer {
    display: none;
}

.promo-template.size-banner .promo-footer {
    flex: 0 0 auto;
    flex-direction: column;
    padding: 0;
    margin: 0;
    border: none;
    gap: 0.2em;
}

/* =====================================================
   Tall/Skyscraper Layouts (160x600, 300x600)
   ===================================================== */

.promo-template.layout-tall .promo-content {
    justify-content: space-between;
}

.promo-template.layout-tall .promo-image-container {
    flex: 0 0 35%;
}

.promo-template.layout-tall .promo-text-section {
    padding: 0;
}

/* =====================================================
   Square Layouts
   ===================================================== */

.promo-template.layout-square .promo-image-container {
    flex: 0 0 40%;
}

/* =====================================================
   Wide Layouts
   ===================================================== */

.promo-template.layout-wide .promo-content {
    flex-direction: row;
    flex-wrap: wrap;
}

.promo-template.layout-wide .promo-header {
    width: 100%;
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: center;
}

.promo-template.layout-wide .promo-image-container {
    flex: 0 0 35%;
}

.promo-template.layout-wide .promo-text-section {
    flex: 1;
    text-align: left;
}

.promo-template.layout-wide .promo-footer {
    width: 100%;
}

/* =====================================================
   Rack Card Back (Rules)
   ===================================================== */

.promo-template.layout-rules {
    background: #ffffff;
    color: #000000;
}

.promo-template.layout-rules .promo-content {
    padding: 8%;
}

.promo-template.layout-rules .promo-rules-title {
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1em;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5em;
}

.promo-template.layout-rules .promo-rules-text {
    font-size: 0.55em;
    line-height: 1.5;
    color: #333333;
    text-align: left;
}

/* =====================================================
   Property Logo
   ===================================================== */

.promo-logo {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 30%;
    max-height: 15%;
    object-fit: contain;
    z-index: 10;
}

/* =====================================================
   Facebook Icon SVG
   ===================================================== */

.fb-icon {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    background: #1877f2;
    border-radius: 50%;
    position: relative;
}

.fb-icon::after {
    content: 'f';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 0.8em;
}

/* =====================================================
   Placeholder Image Styles
   ===================================================== */

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =====================================================
   Print Bleed Markers
   ===================================================== */

.bleed-area {
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(255, 0, 255, 0.5);
    pointer-events: none;
    z-index: 100;
}

.safe-area {
    position: absolute;
    top: var(--bleed);
    left: var(--bleed);
    right: var(--bleed);
    bottom: var(--bleed);
    border: 1px dashed rgba(0, 255, 255, 0.5);
    pointer-events: none;
    z-index: 100;
}
