/* CSS Shadow Generator Tool Styles */

.tool-container {
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Shadow Type Selector */
.shadow-type-selector {
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 0.5rem 1.2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #4a6cf7;
    color: #4a6cf7;
}

.tab-btn:hover:not(.active) {
    background-color: #f5f5f5;
}

/* Shadow Layout */
.shadow-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .shadow-layout {
        grid-template-columns: 1fr;
    }
}

/* Preview Area */
.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    min-height: 300px;
}

.preview-wrapper {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #fff;
    transition: background-color 0.3s;
}

.preview-wrapper.dark {
    background-color: #333;
}

.preview-wrapper.pattern {
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.shadow-preview {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.shadow-preview.active {
    display: flex;
}

.shadow-box {
    width: 150px;
    height: 150px;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.shadow-text {
    font-size: 40px;
    font-weight: bold;
    color: #444;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.preview-hint {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-bg-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
}

.preview-bg-btn.active {
    border-color: #4a6cf7;
}

.preview-bg-btn.light {
    background-color: #fff;
    border: 1px solid #ddd;
}

.preview-bg-btn.dark {
    background-color: #333;
}

.preview-bg-btn.pattern {
    background-image: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                      linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

/* Controls Area */
.controls-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #222;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background-color: #e0e0e0;
}

/* Shadow Layers */
.shadow-layers {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f9f9f9;
}

.shadow-layer {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.shadow-layer.active {
    border-color: #4a6cf7;
}

.layer-header {
    padding: 0.7rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
    cursor: pointer;
}

.layer-title {
    font-weight: 600;
    color: #333;
}

.layer-actions {
    display: flex;
    gap: 0.5rem;
}

.toggle-layer,
.remove-layer {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.toggle-layer:hover,
.remove-layer:hover {
    background-color: #e0e0e0;
}

.toggle-layer.collapsed {
    transform: rotate(-90deg);
}

.remove-layer:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.layer-controls {
    padding: 1rem;
}

.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.control-row label {
    width: 80px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.control-row input[type="range"] {
    flex: 1;
    margin-right: 10px;
}

.value-display {
    display: flex;
    align-items: center;
    width: 100px;
}

.value-display input[type="number"],
.value-display input[type="text"] {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.unit {
    margin-left: 5px;
    font-size: 0.9rem;
    color: #444;
    font-weight: 500;
}

.opacity {
    width: 60px;
    margin-right: 5px;
}

.opacity-value {
    font-size: 0.9rem;
    color: #444;
    font-weight: 500;
    width: 35px;
}

input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    margin-right: 10px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: all 0.4s;
    width: 40px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.4s;
}

.toggle-switch input:checked + label {
    background-color: #4a6cf7;
}

.toggle-switch input:checked + label:before {
    transform: translateX(20px);
}

/* Element Customization */
.element-customization {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f9f9f9;
    display: none;
}

.element-customization.active {
    display: block;
}

.size-inputs {
    display: flex;
    gap: 10px;
}

.size-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.size-input span {
    color: #333;
    font-weight: 500;
}

.size-input input {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

select {
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 200px;
}

/* Code Output */
.code-output {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.code-header h3 {
    margin: 0;
}

.css-code {
    background-color: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

/* Presets */
.presets {
    margin-bottom: 1rem;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background-color: #e0e0e0;
}