/* Frontend styles for RGB to HEX Converter block */
.wp-block-xtools-rgb-to-hex-converter {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.xtools-converter-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.xtools-input-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.xtools-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.xtools-input-group {
    position: relative;
}

.xtools-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
}

.xtools-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    overflow: hidden;
}

.xtools-converter-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    color: #374151;
}

.xtools-converter-input:focus {
    outline: none;
}

.xtools-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.xtools-converter-input.error {
    color: #dc2626;
}

.xtools-input-wrapper.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.xtools-copy-btn {
    padding: 8px 16px;
    background: transparent;
    color: #6b7280;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 1px solid #e5e7eb;
}

.xtools-copy-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.xtools-copy-btn.copied {
    color: #059669;
}

.xtools-color-preview-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xtools-color-preview-section label {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
}

.xtools-color-preview {
    width: 100%;
    height: 80px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.xtools-error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.xtools-transparency-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xtools-transparency-section label {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
}

.xtools-alpha-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, 
        rgba(0,0,0,0.1) 0%, 
        rgba(0,0,0,0.5) 50%, 
        rgba(0,0,0,1) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.xtools-alpha-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.xtools-alpha-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    border: none;
}

/* Responsive design */
@media (max-width: 640px) {
    .wp-block-xtools-rgb-to-hex-converter {
        margin: 10px;
        padding: 20px;
    }
    
    .xtools-input-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .xtools-input-wrapper {
        flex-direction: column;
    }
    
    .xtools-copy-btn {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        width: 100%;
        padding: 12px;
    }
    
    .xtools-color-preview {
        height: 60px;
    }
}