/* Forms Specific Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.form-preview {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.form-field {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--surface-color);
    transition: var(--transition);
}

.form-field:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

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

.field-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.field-required::after {
    content: ' *';
    color: var(--error-color);
}

.field-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Input Types */
.input-text,
.input-email,
.input-tel,
.input-url,
.input-number,
.input-date,
.input-time,
.input-datetime,
.textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--surface-color);
}

.input-text:focus,
.input-email:focus,
.input-tel:focus,
.input-url:focus,
.input-number:focus,
.input-date:focus,
.input-time:focus,
.input-datetime:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

/* Select Styles */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: var(--surface-color);
    appearance: none;
    cursor: pointer;
}

.select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.radio-option:hover,
.checkbox-option:hover {
    background: rgba(0,0,0,0.02);
}

.radio-input,
.checkbox-input {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
}

.radio-label,
.checkbox-label {
    font-weight: 500;
    color: var(--text-primary);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.02);
}

.file-upload.dragover {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-upload-text {
    margin-bottom: 1rem;
}

.file-upload-input {
    display: none;
}

.file-preview {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0,0,0,0.02);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.file-icon {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.7;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-remove {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
}

.file-remove:hover {
    background: rgba(230, 57, 70, 0.1);
}

/* Range Slider */
.range-container {
    padding: 1rem 0;
}

.range-input {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    outline: none;
    appearance: none;
}

.range-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Rating Stars */
.rating-group {
    display: flex;
    gap: 0.25rem;
    direction: rtl;
}

.rating-input {
    display: none;
}

.rating-label {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.rating-label:hover,
.rating-label:hover ~ .rating-label,
.rating-input:checked ~ .rating-label {
    color: #ffc107;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-actions.center {
    justify-content: center;
}

.form-actions .btn {
    min-width: 120px;
}

/* Progress Bar */
.form-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Multi-step Forms */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Conditional Fields */
.conditional-field {
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-light);
    background: rgba(67, 97, 238, 0.02);
    margin-top: 1rem;
}

/* Validation States */
.form-field.valid {
    border-color: #28a745;
}

.form-field.invalid {
    border-color: var(--error-color);
}

.validation-message {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-error {
    color: var(--error-color);
}

.validation-success {
    color: #28a745;
}

/* Character Count */
.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.char-count.warning {
    color: #ffc107;
}

.char-count.error {
    color: var(--error-color);
}

/* Responsive Forms */
@media (max-width: 768px) {
    .form-container {
        padding: 1rem;
    }
    
    .form-preview {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 0.5rem;
    }
}

/* Print Styles for Forms */
@media print {
    .form-actions,
    .file-upload,
    .char-count {
        display: none !important;
    }
    
    .form-field {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
}

/* Footer Top Responsive Styles */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: #0099ff;
    color: white;
    padding: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .footer-top > div {
        padding: 4px !important;
    }
    
    #footer-clock {
        order: -1; /* Put clock at top on mobile */
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-top {
        font-size: 12px !important;
    }
    
    #footer-clock {
        font-size: 11px !important;
    }
}