/* ==========================================================================
   KAANTHAL PRINTERS - DEATH BANNER CREATOR (கண்ணீர் அஞ்சலி பதாகை) STYLES
   ========================================================================== */

:root {
    --bc-bg-dark: #0f172a;
    --bc-panel-bg: #1e293b;
    --bc-panel-border: #334155;
    --bc-primary: #f59e0b;
    --bc-primary-hover: #d97706;
    --bc-accent-blue: #3b82f6;
    --bc-text-main: #f8fafc;
    --bc-text-muted: #94a3b8;
    --bc-gold: #d4af37;
    --bc-gold-light: #fff8d6;
    --bc-gold-dark: #845318;
}

/* Page Wrapper */
.bc-page-wrapper {
    background-color: #0b0f19;
    min-height: calc(100vh - 80px);
    padding: 1.5rem 0 3rem;
    color: var(--bc-text-main);
    font-family: 'Plus Jakarta Sans', 'Noto Sans Tamil', sans-serif;
}

/* Header Banner */
.bc-header-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--bc-panel-border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.bc-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.bc-header-title h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.bc-header-title p {
    margin: 0;
    color: var(--bc-text-muted);
    font-size: 0.9rem;
}

.bc-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.bc-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--bc-panel-border);
    background: #1e293b;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bc-tool-btn:hover {
    background: #334155;
    transform: translateY(-1px);
    border-color: #475569;
}

.bc-btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    color: #000000;
}

.bc-btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fbbf24;
    color: #000000;
}

.bc-btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    color: #ffffff;
}

.bc-btn-success:hover {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
    color: #ffffff;
}

/* Main Workspace Grid */
.bc-workspace {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .bc-workspace {
        grid-template-columns: 1fr;
    }
}

/* Controls Panel */
.bc-controls-panel {
    background: var(--bc-panel-bg);
    border: 1px solid var(--bc-panel-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.bc-tabs-nav {
    display: flex;
    background: #0f172a;
    border-bottom: 1px solid var(--bc-panel-border);
    overflow-x: auto;
    scrollbar-width: thin;
}

.bc-tab-btn {
    flex: 1;
    min-width: 85px;
    padding: 0.9rem 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--bc-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bc-tab-btn i {
    font-size: 1.1rem;
}

.bc-tab-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.03);
}

.bc-tab-btn.active {
    color: #fbbf24;
    border-bottom-color: #fbbf24;
    background: rgba(245, 158, 11, 0.08);
}

.bc-tab-content {
    padding: 1.25rem;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.bc-tab-pane {
    display: none;
}

.bc-tab-pane.active {
    display: block;
    animation: bcFadeIn 0.3s ease;
}

@keyframes bcFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Controls */
.bc-form-group {
    margin-bottom: 1.1rem;
}

.bc-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
}

.bc-form-group label span {
    color: var(--bc-text-muted);
    font-weight: normal;
    font-size: 0.78rem;
}

.bc-input, .bc-select, .bc-textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #0f172a;
    border: 1px solid var(--bc-panel-border);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bc-input:focus, .bc-select:focus, .bc-textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.bc-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.bc-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
}

/* Chip/Badge Selectors */
.bc-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.bc-chip {
    background: #0f172a;
    border: 1px solid var(--bc-panel-border);
    color: #cbd5e1;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bc-chip:hover {
    border-color: #f59e0b;
    color: #ffffff;
}

.bc-chip.active {
    background: #f59e0b;
    color: #000000;
    font-weight: 600;
    border-color: #f59e0b;
}

/* Visual Style Options (Cards) */
.bc-option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.65rem;
}

.bc-opt-card {
    background: #0f172a;
    border: 2px solid var(--bc-panel-border);
    border-radius: 10px;
    padding: 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.bc-opt-card:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.bc-opt-card.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.bc-opt-card img, .bc-opt-card .bc-opt-preview {
    height: 48px;
    object-fit: contain;
    margin-bottom: 0.4rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.bc-opt-card span {
    font-size: 0.75rem;
    font-weight: 600;
    display: block;
    color: #e2e8f0;
}

/* Photo Upload Box */
.bc-upload-dropzone {
    border: 2px dashed #475569;
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.bc-upload-dropzone:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.bc-upload-dropzone i {
    font-size: 2rem;
    color: #f59e0b;
    margin-bottom: 0.5rem;
    display: block;
}

.bc-upload-dropzone p {
    margin: 0;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.bc-upload-dropzone span {
    font-size: 0.75rem;
    color: var(--bc-text-muted);
}

/* Range Sliders */
.bc-range-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bc-range-wrap input[type="range"] {
    flex: 1;
    accent-color: #f59e0b;
}

.bc-range-val {
    font-size: 0.8rem;
    color: var(--bc-text-muted);
    min-width: 38px;
    text-align: right;
}

/* Preview Viewport & Controls */
.bc-preview-wrapper {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bc-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bc-panel-bg);
    border: 1px solid var(--bc-panel-border);
    border-radius: 12px;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
}

.bc-preview-toolbar .bc-view-scale {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bc-canvas-container {
    background: #000000;
    border: 1px solid var(--bc-panel-border);
    border-radius: 14px;
    padding: 1.25rem;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    min-height: 420px;
}

/* ==========================================================================
   THE BANNER CANVAS (கண்ணீர் அஞ்சலி பதாகை)
   Ratio 2:1 (1200px x 600px default scale, scales gracefully via container)
   ========================================================================== */
#bannerCanvas {
    width: 1000px;
    height: 500px;
    min-width: 1000px;
    min-height: 500px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    transition: background 0.3s;
}

/* Background Themes */
.bc-theme-cream-gold {
    background: radial-gradient(circle at 50% 45%, #fffdf4 0%, #fef4dc 40%, #fae8bd 70%, #edd39a 100%);
    color: #1a1006;
}

.bc-theme-black-gold {
    background: radial-gradient(circle at 50% 45%, #1e1b18 0%, #12100e 50%, #080706 100%);
    color: #ffffff;
}

.bc-theme-maroon-gold {
    background: radial-gradient(circle at 50% 45%, #4a0d16 0%, #30060d 60%, #1a0206 100%);
    color: #ffffff;
}

.bc-theme-lotus-white {
    background: radial-gradient(circle at 50% 45%, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    color: #0f172a;
}

.bc-theme-royal-navy {
    background: radial-gradient(circle at 50% 45%, #1e293b 0%, #0f172a 60%, #030712 100%);
    color: #ffffff;
}

/* Outer Border & Ornaments */
.bc-canvas-border {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid #d4af37;
    border-radius: 6px;
    pointer-events: none;
    z-index: 10;
    box-shadow: inset 0 0 0 2px #5a340a, 0 0 12px rgba(212, 175, 55, 0.35);
}

.bc-canvas-inner-border {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border: 1px solid #d4af37;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.85;
}

/* Corner Ornaments */
.bc-corner-flourish {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 15;
}

.bc-corner-tl { top: 12px; left: 12px; }
.bc-corner-tr { top: 12px; right: 12px; transform: scaleX(-1); }
.bc-corner-bl { bottom: 12px; left: 12px; transform: scaleY(-1); }
.bc-corner-br { bottom: 12px; right: 12px; transform: scale(-1, -1); }

/* Bottom Gold Lace */
.bc-bottom-lace {
    position: absolute;
    bottom: 18px;
    left: 40px;
    right: 40px;
    height: 14px;
    background-image: url('../images/notice/patterns/banner-gold-lace.svg');
    background-repeat: repeat-x;
    background-size: 50px 14px;
    opacity: 0.85;
    z-index: 12;
    pointer-events: none;
}

/* Header Title Bar */
.bc-canvas-header {
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    text-align: center;
    z-index: 20;
}

.bc-invocation-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2px;
    color: #92400e;
    text-transform: uppercase;
}

.bc-theme-black-gold .bc-invocation-text,
.bc-theme-maroon-gold .bc-invocation-text,
.bc-theme-royal-navy .bc-invocation-text {
    color: #fde047;
}

.bc-title-text {
    font-family: 'Noto Serif Tamil', 'Arima Madurai', serif;
    font-size: 44px;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.6);
    -webkit-text-stroke: 1px #451a03;
}

.bc-theme-cream-gold .bc-title-text {
    color: #ffffff;
    text-shadow: 0 3px 6px #000000, 0 1px 2px #000000, 0 0 12px #000000;
    -webkit-text-stroke: 1.2px #000000;
}

/* Top Header Divider Line */
.bc-header-divider {
    position: absolute;
    top: 86px;
    left: 30px;
    right: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #d4af37 20%, #fff8d6 50%, #d4af37 80%, transparent 100%);
    z-index: 15;
}

/* Centerpiece Oval Frame & Photo */
.bc-canvas-centerpiece {
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 290px;
    z-index: 25;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bc-frame-wrapper {
    position: relative;
    width: 230px;
    height: 275px;
}

.bc-photo-container {
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    bottom: 22px;
    border-radius: 50% / 50%;
    overflow: hidden;
    background: #1e293b;
    z-index: 1;
}

.bc-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.2s ease;
}

.bc-frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/notice/frames/banner-oval-gold.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
}

/* Frame Base Floral Garland Bouquet */
.bc-frame-garland {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 90px;
    background-image: url('../images/notice/garlands/banner-floral-lilies.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    z-index: 3;
    pointer-events: none;
}

/* Left & Right Date Wings */
.bc-wing-left, .bc-wing-right {
    position: absolute;
    top: 155px;
    width: 320px;
    text-align: center;
    z-index: 20;
}

.bc-wing-left { left: 40px; }
.bc-wing-right { right: 40px; }

.bc-date-label {
    font-family: 'Noto Serif Tamil', serif;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #1a1006;
}

.bc-theme-black-gold .bc-date-label,
.bc-theme-maroon-gold .bc-date-label,
.bc-theme-royal-navy .bc-date-label {
    color: #fde047;
}

.bc-date-value {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.1;
    color: #000000;
}

.bc-theme-black-gold .bc-date-value,
.bc-theme-maroon-gold .bc-date-value,
.bc-theme-royal-navy .bc-date-value {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.bc-wing-divider {
    width: 150px;
    height: 16px;
    margin: 6px auto 0;
    background-image: url('../images/notice/patterns/banner-divider-gold.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Hanging Temple Lamps (Left & Right of Frame) */
.bc-hanging-lamp {
    position: absolute;
    top: 90px;
    width: 65px;
    height: 150px;
    z-index: 18;
    background-image: url('../images/notice/lamps/hanging-lamp-gold.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    pointer-events: none;
}

.bc-hanging-lamp-left { left: 240px; }
.bc-hanging-lamp-right { right: 240px; }

/* Standing Kuthuvilakku Lamps (Bottom Left & Right) */
.bc-standing-lamp {
    position: absolute;
    bottom: 24px;
    width: 75px;
    height: 110px;
    z-index: 18;
    background-image: url('../images/notice/lamps/standing-kuthuvilakku-floral.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    pointer-events: none;
}

.bc-standing-lamp-left { left: 30px; }
.bc-standing-lamp-right { right: 30px; }

/* Bottom Name Plaque (Capsule Ribbon) */
.bc-name-plaque-wrap {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    z-index: 30;
    text-align: center;
}

.bc-name-plaque {
    background: linear-gradient(180deg, #1f1d1a 0%, #0a0908 50%, #1a1815 100%);
    border: 2px solid #d4af37;
    border-radius: 30px;
    padding: 8px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 1px 2px #fff8d6;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 580px;
    position: relative;
}

.bc-name-plaque::before, .bc-name-plaque::after {
    content: "✦";
    color: #d4af37;
    font-size: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.bc-name-plaque::before { left: 14px; }
.bc-name-plaque::after { right: 14px; }

.bc-name-text {
    font-family: 'Noto Serif Tamil', 'Arima Madurai', serif;
    font-size: 32px;
    font-weight: 800;
    color: #fff8d6;
    margin: 0;
    line-height: 1.15;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
}

.bc-subtitle-text {
    font-family: 'Noto Sans Tamil', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fbbf24;
    margin-top: 2px;
}

/* Bottom Notice By / Tributes Info */
.bc-footer-info {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
    font-family: 'Noto Sans Tamil', serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #3b220c;
    z-index: 28;
}

.bc-theme-black-gold .bc-footer-info,
.bc-theme-maroon-gold .bc-footer-info,
.bc-theme-royal-navy .bc-footer-info {
    color: #fde047;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
