/* ============================================================
   WORDART APP
   Title / WordArt designer - Win95 styled
   ============================================================ */

/* ---- Container layout ---- */

.wordart-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 4px;
    gap: 4px;
    overflow: hidden;
}

/* ---- Text input row ---- */

.wordart-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.wordart-label {
    font-size: 11px;
    color: var(--win95-text);
    white-space: nowrap;
}

.wordart-text-input {
    flex: 1;
    height: 21px;
    padding: 1px 4px;
    font-family: inherit;
    font-size: 11px;
    background: var(--win95-white);
    color: var(--win95-text);
    border: none;
    outline: none;
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset 2px 2px var(--win95-dark);
}

.wordart-text-input:focus {
    outline: none;
}

/* ---- Controls row ---- */

.wordart-controls-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.wordart-select {
    height: 21px;
    padding: 1px 2px;
    font-family: inherit;
    font-size: 11px;
    background: var(--win95-white);
    color: var(--win95-text);
    border: none;
    outline: none;
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset 2px 2px var(--win95-dark);
    cursor: pointer;
}

.wordart-font-select {
    width: 120px;
}

.wordart-size-select {
    width: 60px;
}

.wordart-toggle-btn {
    width: 24px;
    height: 22px;
    font-family: inherit;
    font-size: 12px;
    background: var(--win95-bg);
    color: var(--win95-text);
    border: none;
    cursor: pointer;
    box-shadow:
        inset -1px -1px var(--win95-dark),
        inset 1px 1px var(--win95-white),
        inset -2px -2px var(--win95-gray),
        inset 2px 2px var(--win95-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wordart-toggle-btn:active,
.wordart-toggle-btn.active {
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-dark),
        inset -2px -2px var(--win95-light),
        inset 2px 2px var(--win95-gray);
    background: var(--win95-light);
}

.wordart-copy-btn {
    height: 22px;
    padding: 0 8px;
    font-family: inherit;
    font-size: 11px;
    background: var(--win95-bg);
    color: var(--win95-text);
    border: none;
    cursor: pointer;
    margin-left: auto;
    box-shadow:
        inset -1px -1px var(--win95-dark),
        inset 1px 1px var(--win95-white),
        inset -2px -2px var(--win95-gray),
        inset 2px 2px var(--win95-light);
}

.wordart-copy-btn:active {
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-dark),
        inset -2px -2px var(--win95-light),
        inset 2px 2px var(--win95-gray);
}

/* ---- Section labels ---- */

.wordart-section-label {
    font-size: 11px;
    color: var(--win95-text);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ---- Style gallery ---- */

.wordart-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 50px);
    gap: 2px;
    flex-shrink: 0;
    padding: 2px;
    background: var(--win95-white);
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset 2px 2px var(--win95-dark);
}

.wordart-gallery-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    padding: 2px;
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-gray);
}

.wordart-gallery-cell:hover {
    border-color: var(--win95-gray);
}

.wordart-gallery-cell.selected {
    border-color: var(--win95-navy, #000080);
    background: #e0e0ff;
}

.wordart-gallery-text {
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    line-height: 1.2;
    text-align: center;
    display: inline-block;
    pointer-events: none;
}

/* ---- Preview area ---- */

.wordart-preview {
    flex: 1;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--win95-white);
    overflow: hidden;
    box-shadow:
        inset -1px -1px var(--win95-white),
        inset 1px 1px var(--win95-gray),
        inset -2px -2px var(--win95-light),
        inset 2px 2px var(--win95-dark);
    padding: 8px;
}

.wordart-preview-text {
    text-align: center;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.2;
}


/* ============================================================
   WORDART STYLE CLASSES (1-15)
   Used in both the gallery cells and the live preview
   ============================================================ */

/* 1. Rainbow - horizontal rainbow gradient */
.wordart-style-1 {
    background: linear-gradient(
        to right,
        #ff0000, #ff8800, #ffff00, #00cc00, #0088ff, #4400ff, #8800cc
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 2. Gold - metallic gold gradient */
.wordart-style-2 {
    background: linear-gradient(
        to bottom,
        #ffd700 0%,
        #ffec80 40%,
        #ffd700 50%,
        #b8860b 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. Chrome - silver metallic gradient */
.wordart-style-3 {
    background: linear-gradient(
        to bottom,
        #d0d0d0 0%,
        #ffffff 25%,
        #a0a0a0 50%,
        #ffffff 75%,
        #808080 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. Fire - red to yellow gradient */
.wordart-style-4 {
    background: linear-gradient(
        to top,
        #ff0000 0%,
        #ff6600 40%,
        #ffcc00 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 5. Ocean - blue to cyan gradient */
.wordart-style-5 {
    background: linear-gradient(
        to bottom,
        #0000cc 0%,
        #0066ff 50%,
        #00cccc 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 6. Neon Green - bright green with glow */
.wordart-style-6 {
    color: #00ff00;
    -webkit-text-fill-color: #00ff00;
    text-shadow:
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 20px #00aa00,
        0 0 40px #008800;
}

/* 7. Neon Pink - hot pink with glow */
.wordart-style-7 {
    color: #ff1493;
    -webkit-text-fill-color: #ff1493;
    text-shadow:
        0 0 5px #ff1493,
        0 0 10px #ff1493,
        0 0 20px #cc0077,
        0 0 40px #990055;
}

/* 8. Shadow - black with offset gray shadow */
.wordart-style-8 {
    color: #000000;
    -webkit-text-fill-color: #000000;
    text-shadow:
        3px 3px 0 #888888,
        3px 3px 2px rgba(0, 0, 0, 0.3);
}

/* 9. Outline - hollow text with colored border */
.wordart-style-9 {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 2px #0000cc;
}

/* 10. 3D Block - multiple offset shadows for 3D depth */
.wordart-style-10 {
    color: #cc0000;
    -webkit-text-fill-color: #cc0000;
    text-shadow:
        1px 1px 0 #800000,
        2px 2px 0 #700000,
        3px 3px 0 #600000,
        4px 4px 0 #500000,
        5px 5px 0 #400000,
        6px 6px 0 #300000,
        7px 7px 4px rgba(0, 0, 0, 0.3);
}

/* 11. Retro - purple/orange gradient with thick outline */
.wordart-style-11 {
    background: linear-gradient(
        to bottom,
        #8b00ff 0%,
        #ff6600 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1.5px #333333;
    text-shadow: none;
}

/* 12. Ice - white to light blue with subtle shadow */
.wordart-style-12 {
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #e0f0ff 30%,
        #87ceeb 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 3px rgba(135, 206, 235, 0.6);
    filter: drop-shadow(1px 1px 2px rgba(135, 206, 235, 0.5));
}

/* 13. Blood - dark red with drip-like shadow */
.wordart-style-13 {
    color: #8b0000;
    -webkit-text-fill-color: #8b0000;
    text-shadow:
        0 2px 1px #330000,
        0 4px 3px rgba(51, 0, 0, 0.5),
        0 6px 6px rgba(139, 0, 0, 0.3);
}

/* 14. Matrix - green on black with glow */
.wordart-style-14 {
    color: #00ff00;
    -webkit-text-fill-color: #00ff00;
    text-shadow:
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 15px #00cc00;
}
/* Gallery cell and preview get black background for Matrix style */
.wordart-gallery-cell:has(.wordart-style-14) {
    background: #000000;
}
.wordart-preview:has(.wordart-style-14) {
    background: #000000;
}

/* 15. Vaporwave - pink to cyan gradient, italic hint */
.wordart-style-15 {
    background: linear-gradient(
        to right,
        #ff69b4 0%,
        #da70d6 50%,
        #00ced1 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
}

/* ---- Gallery-specific scaling for style previews ---- */

.wordart-gallery-text.wordart-style-9 {
    -webkit-text-stroke-width: 1px;
}

.wordart-gallery-text.wordart-style-10 {
    text-shadow:
        1px 1px 0 #800000,
        2px 2px 0 #700000,
        3px 3px 0 #600000;
}

.wordart-gallery-text.wordart-style-12 {
    filter: none;
}
