/**
 * ConvMaster - CSS Text-Shadow Generator Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--text-shadow {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.2));
    font-family: Georgia, serif;
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   TEXT-SHADOW GENERATOR WIDGET
   ===================================================== */
.text-shadow-generator {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   WORKSPACE LAYOUT
   ===================================================== */
.text-shadow-generator__workspace {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (max-width: 900px) {
    .text-shadow-generator__workspace {
        grid-template-columns: 1fr;
    }
    
    .text-shadow-generator__preview-column {
        order: -1;
    }
}

.text-shadow-generator__config {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.text-shadow-generator__section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.text-shadow-generator__section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.text-shadow-generator__step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.text-shadow-generator__section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

/* =====================================================
   SHADOW CONTROLS
   ===================================================== */
.shadow-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shadow-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shadow-control > label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.shadow-control__input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shadow-form__input {
    width: 70px;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    -moz-appearance: textfield;
}

.shadow-form__input::-webkit-outer-spin-button,
.shadow-form__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shadow-form__input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.shadow-form__input:focus {
    outline: none;
    border-color: var(--primary);
}

.shadow-form__input--hex {
    width: 90px;
    text-transform: uppercase;
}

.shadow-form__input--full {
    width: 100%;
    text-align: left;
}

.shadow-form__slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-secondary);
    border-radius: 3px;
    cursor: pointer;
}

.shadow-form__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.shadow-form__slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.shadow-form__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.shadow-control__color-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shadow-form__color {
    width: 50px;
    height: 36px;
    padding: 2px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: transparent;
}

.shadow-form__color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.shadow-form__color::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.shadow-form__select {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.shadow-form__select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Add Shadow Button */
.btn--add-shadow {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    margin-top: 1rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
}

.btn--add-shadow:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* =====================================================
   SHADOW LAYERS
   ===================================================== */
.shadow-layers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.shadow-layer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.shadow-layer:hover {
    border-color: var(--primary);
}

.shadow-layer--active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.shadow-layer__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.shadow-layer__color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.shadow-layer__text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-layer__remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.shadow-layer__remove:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.shadow-layer__remove svg {
    width: 16px;
    height: 16px;
}

/* =====================================================
   TEXT OPTIONS
   ===================================================== */
.text-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.text-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.text-option > label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.text-option-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* =====================================================
   SHADOW PREVIEW
   ===================================================== */
.shadow-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 2rem;
    background: #FFFFFF;
    border-radius: var(--radius-md);
    transition: background 0.3s ease;
    overflow: hidden;
}

.shadow-preview__text {
    font-family: Impact, sans-serif;
    font-size: 48px;
    font-weight: bold;
    color: #333333;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    text-align: center;
    word-break: break-word;
}

/* =====================================================
   EFFECT GALLERY
   ===================================================== */
.effect-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.effect-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Impact, sans-serif;
    font-size: 1.25rem;
    font-weight: bold;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.effect-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.effect-btn--active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Effect Preview Styles */
.effect-btn[data-preset="simple"] {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.effect-btn[data-preset="neon"] {
    color: #fff;
    background: #1a1a2e;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #ff00de, 0 0 30px #ff00de;
}

.effect-btn[data-preset="retro"] {
    text-shadow: 3px 3px 0 #ff6b6b, 6px 6px 0 #feca57;
}

.effect-btn[data-preset="3d"] {
    text-shadow: 1px 1px 0 #999, 2px 2px 0 #888, 3px 3px 0 #777, 4px 4px 0 #666, 5px 5px 0 #555;
}

.effect-btn[data-preset="emboss"] {
    color: #ccc;
    text-shadow: -1px -1px 1px #fff, 1px 1px 1px #333;
}

.effect-btn[data-preset="outline"] {
    color: var(--bg-card);
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.effect-btn[data-preset="fire"] {
    color: #ffc107;
    text-shadow: 0 0 5px #ff9800, 0 -5px 10px #ff5722, 0 -10px 20px #f44336;
}

.effect-btn[data-preset="vintage"] {
    color: #d4a574;
    text-shadow: 2px 2px 0 #8b7355, 4px 4px 0 #5d4e37;
}

.effect-btn[data-preset="glitch"] {
    color: #fff;
    text-shadow: 2px 0 #ff0000, -2px 0 #00ffff;
}

.effect-btn[data-preset="soft"] {
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.effect-btn[data-preset="hard"] {
    text-shadow: 4px 4px 0 rgba(0,0,0,0.8);
}

.effect-btn[data-preset="long"] {
    text-shadow: 1px 1px 0 #aaa, 2px 2px 0 #aaa, 3px 3px 0 #aaa, 4px 4px 0 #aaa, 5px 5px 0 #aaa, 6px 6px 0 #aaa, 7px 7px 0 #aaa, 8px 8px 0 #aaa;
}

/* =====================================================
   CSS OUTPUT
   ===================================================== */
.css-output {
    background: #1e1e2e;
    border-radius: var(--radius-md);
    padding: 1rem;
    overflow-x: auto;
}

.css-output code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #89dceb;
    white-space: pre-wrap;
    word-break: break-all;
}

/* =====================================================
   WYSIWYG SECTION
   ===================================================== */
.text-shadow-generator__wysiwyg {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

@media (max-width: 900px) {
    .text-shadow-generator__wysiwyg {
        grid-template-columns: 1fr;
    }
}

.wysiwyg-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wysiwyg-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wysiwyg-section__header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

.wysiwyg-section__code {
    background: #1e1e2e;
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 100px;
    overflow: auto;
}

.wysiwyg-section__code code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #cdd6f4;
    white-space: pre-wrap;
    word-break: break-all;
    outline: none;
    display: block;
}

.wysiwyg-section__code--editable {
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.wysiwyg-section__code--editable:focus-within {
    border-color: var(--primary);
}

.wysiwyg-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 1.5rem;
    background: #FFFFFF;
    border-radius: var(--radius-md);
    transition: background 0.3s ease;
    overflow: hidden;
}

.wysiwyg-preview__text {
    font-family: Impact, sans-serif;
    font-size: 32px;
    font-weight: bold;
    color: #333333;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    outline: none;
    cursor: text;
    text-align: center;
}

.wysiwyg-preview__text:focus {
    outline: 2px dashed var(--primary);
    outline-offset: 4px;
}

/* =====================================================
   ACTION BUTTONS
   ===================================================== */
.text-shadow-generator__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn--primary {
    background: var(--primary);
    color: white;
}

.btn--primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background: var(--bg-secondary);
}

.btn--outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn--outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.btn--icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
}

.btn--icon:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn svg {
    flex-shrink: 0;
}

/* Privacy Info */
.shadow-preview__info {
    text-align: center;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.shadow-preview__info p {
    font-size: 0.8rem;
    color: var(--success);
    margin: 0;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tool-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Syntax Card */
.syntax-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.syntax-card code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* =====================================================
   HIDDEN ELEMENTS
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
    .text-shadow-generator__workspace {
        padding: 1rem;
    }
    
    .text-option-row {
        grid-template-columns: 1fr;
    }
    
    .effect-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .shadow-control__input-row {
        flex-wrap: wrap;
    }
    
    .shadow-form__slider {
        width: 100%;
    }
    
    .shadow-preview__text {
        font-size: 32px;
    }
}

/* =====================================================
   LIGHT THEME ADJUSTMENTS
   ===================================================== */
[data-theme="light"] .shadow-form__input,
[data-theme="light"] .shadow-form__color,
[data-theme="light"] .shadow-form__select {
    background: var(--bg-primary);
}

[data-theme="light"] .text-shadow-generator__section {
    background: var(--bg-secondary);
}

[data-theme="light"] .shadow-preview {
    background: #f8f9fa;
}

[data-theme="light"] .css-output {
    background: #f8fafc;
}

[data-theme="light"] .css-output code {
    color: #0d9488;
}

[data-theme="light"] .shadow-layer {
    background: var(--bg-primary);
}

[data-theme="light"] .wysiwyg-section__code {
    background: #f8fafc;
}

[data-theme="light"] .wysiwyg-section__code code {
    color: #334155;
}

[data-theme="light"] .wysiwyg-preview {
    background: #f8f9fa;
}

[data-theme="light"] .effect-btn {
    background: var(--bg-primary);
}

/* =====================================================
   COPY NOTIFICATION
   ===================================================== */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
