/* Color Converter Tool Styles - Dark Theme Default */

.color-converter-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Color Picker and Preview Row */
.color-main-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.color-picker-wrapper,
.color-preview-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.color-picker-wrapper label,
.color-preview-wrapper label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
}

.color-picker-input {
    width: 100%;
    height: 100px;
    border: 2px solid #334155;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-picker-input::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-picker-input:hover {
    border-color: #6366f1;
}

.color-preview-box {
    width: 100%;
    height: 100px;
    border: 2px solid #334155;
    border-radius: 8px;
    background-color: #3b82f6;
}

/* Format Groups */
.format-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
}

.format-group > label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
}

/* Input Row */
.input-row {
    display: flex;
    gap: 0.5rem;
}

.format-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.format-input:focus {
    outline: none;
    border-color: #6366f1;
}

.format-input::placeholder {
    color: #64748b;
}

/* RGB/HSL/HSV Component Inputs */
.rgb-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.component-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.component-input span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
}

.component-input input {
    padding: 0.625rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9rem;
    text-align: center;
    -moz-appearance: textfield;
}

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

.component-input input:focus {
    outline: none;
    border-color: #6366f1;
}

/* Copy Button */
.copy-btn {
    padding: 0.75rem 1rem;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #818cf8;
}

/* CSS Examples */
.css-examples {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
}

.css-examples label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.css-code {
    padding: 0.5rem 0.75rem;
    background: #1e293b;
    border-radius: 4px;
}

.css-code code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: #94a3b8;
}

.css-code code span {
    color: #6366f1;
    font-weight: 600;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.75rem 1.5rem;
    background: #10b981;
    color: #fff;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

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

/* Responsive */
@media (max-width: 640px) {
    .color-main-row {
        grid-template-columns: 1fr;
    }

    .color-picker-input,
    .color-preview-box {
        height: 80px;
    }

    .input-row {
        flex-direction: column;
    }

    .copy-btn {
        width: 100%;
    }

    .copy-notification {
        left: 1rem;
        right: 1rem;
        transform: translateY(20px);
    }

    .copy-notification.show {
        transform: translateY(0);
    }
}

/* Light Theme */
[data-theme="light"] .color-picker-wrapper label,
[data-theme="light"] .color-preview-wrapper label,
[data-theme="light"] .format-group > label,
[data-theme="light"] .css-examples label {
    color: #1f2937;
}

[data-theme="light"] .color-picker-input,
[data-theme="light"] .color-preview-box {
    border-color: #e5e7eb;
}

[data-theme="light"] .format-group,
[data-theme="light"] .css-examples {
    background: #f9fafb;
    border-color: #e5e7eb;
}

[data-theme="light"] .format-input,
[data-theme="light"] .component-input input,
[data-theme="light"] .css-code {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

[data-theme="light"] .component-input span {
    color: #6b7280;
}

[data-theme="light"] .css-code code {
    color: #6b7280;
}
