/* CSS Box Shadow Generator Styles */

/* Preview Container */
.shadow-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: repeating-conic-gradient(#e5e5e5 0% 25%, #f5f5f5 0% 50%) 50% / 20px 20px;
    border-radius: 12px;
    padding: 40px;
}

.shadow-preview-box {
    width: 200px;
    height: 200px;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.2s ease;
}

/* Shadow Layer Items */
#shadowLayersContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shadow-layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bs-secondary-bg);
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shadow-layer-item:hover {
    border-color: #052c65;
}

.shadow-layer-item.active {
    border-color: #052c65;
    background: rgba(5, 44, 101, 0.05);
}

.shadow-layer-preview {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 4px;
    flex-shrink: 0;
}

.shadow-layer-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shadow-layer-name {
    font-weight: 600;
    font-size: 14px;
}

.shadow-layer-values {
    font-size: 12px;
    color: var(--bs-secondary-color);
    font-family: 'Courier New', Courier, monospace;
}

.shadow-layer-actions {
    flex-shrink: 0;
}

/* CSS Code Output */
.css-output {
    background: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: var(--bs-primary-text-emphasis);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

/* Preset Shadows Grid */
.preset-shadows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.preset-shadow-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    background: repeating-conic-gradient(#e5e5e5 0% 25%, #f5f5f5 0% 50%) 50% / 10px 10px;
    border: 2px solid var(--bs-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
}

.preset-shadow-item:hover {
    border-color: #052c65;
    transform: translateY(-2px);
}

.preset-shadow-box {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 6px;
}

/* Range inputs styling */
.form-range::-webkit-slider-thumb {
    cursor: grab;
}

.form-range::-webkit-slider-thumb:active {
    cursor: grabbing;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shadow-preview-container {
        min-height: 250px;
        padding: 30px;
    }

    .shadow-preview-box {
        width: 150px;
        height: 150px;
    }

    .preset-shadows-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .preset-shadow-item {
        height: 80px;
        padding: 10px;
    }

    .preset-shadow-box {
        width: 40px;
        height: 40px;
    }

    .css-output {
        font-size: 12px;
        padding: 12px;
    }
}

/* Dark Mode */
[data-bs-theme="dark"] .shadow-preview-container {
    background: repeating-conic-gradient(#2d2d2d 0% 25%, #3d3d3d 0% 50%) 50% / 20px 20px;
}

[data-bs-theme="dark"] .shadow-layer-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: #495057;
}

[data-bs-theme="dark"] .shadow-layer-item:hover,
[data-bs-theme="dark"] .shadow-layer-item.active {
    border-color: #6ea8fe;
}

[data-bs-theme="dark"] .shadow-layer-item.active {
    background: rgba(110, 168, 254, 0.1);
}

[data-bs-theme="dark"] .shadow-layer-preview {
    background: #4a4a4a;
}

[data-bs-theme="dark"] .css-output {
    background: rgba(255, 255, 255, 0.05);
    border-color: #495057;
}

[data-bs-theme="dark"] .preset-shadow-item {
    background: repeating-conic-gradient(#2d2d2d 0% 25%, #3d3d3d 0% 50%) 50% / 10px 10px;
    border-color: #495057;
}

[data-bs-theme="dark"] .preset-shadow-item:hover {
    border-color: #6ea8fe;
}

[data-bs-theme="dark"] .preset-shadow-box {
    background: #4a4a4a;
}
