/**
 * RFQ Submission Website - Form-specific Styles
 * Complements Tailwind CSS for custom form controls
 */

/* CSS Variables for Primary Colors */
:root {
    --primary: 0 0% 9%;
    --primary-foreground: 0 0% 98%;
    --ring: 0 0% 9%;
    --radius: 0.5rem;
}

/* Primary Button Styles */
.bg-primary {
    background-color: hsl(var(--primary));
}

.text-primary-foreground {
    color: hsl(var(--primary-foreground));
}

.hover\:bg-primary\/90:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.focus-visible\:ring-ring:focus-visible {
    --tw-ring-color: hsl(var(--ring));
}

/* Radio Buttons */
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #1f2937;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #1f2937;
    border-radius: 50%;
}

.radio-label:hover .radio-custom {
    border-color: #9ca3af;
}

/* Checkbox Styles */
.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 0.25rem;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #1f2937;
    border-color: #1f2937;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkbox-custom {
    border-color: #9ca3af;
}

/* File Upload Styles */
.file-upload.dragover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.file-preview .file-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #dcfce7;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #16a34a;
    margin-top: 0.5rem;
}

.file-preview .file-name .remove-file {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

/* Spinner Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 0.8s linear infinite;
}

/* Focus States for Form Elements */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.2);
}

/* Select Arrow */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* List Items with Bullets */
li.before\:content-\[\'\•\'\]::before {
    content: '• ';
    margin-right: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .radio-inline {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .file-upload,
    button[type="submit"] {
        display: none;
    }
}
