/**
 * Universal Help - Public Styles (Enhanced UI/UX)
 */

.uh-form-container {
    max-width: 650px;
    margin: 30px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.uh-form-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
    text-align: center;
}

.uh-form-description {
    margin-bottom: 30px;
    color: #666;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
}

.uh-field-wrapper {
    margin-bottom: 24px;
}

.uh-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.uh-required {
    color: #e74c3c;
    font-weight: bold;
}

.uh-field-input,
.uh-field-textarea,
.uh-field-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    color: #2c3e50;
}

.uh-field-input:hover,
.uh-field-textarea:hover,
.uh-field-select:hover {
    background-color: #ffffff;
    border-color: #cbd5e0;
}

.uh-field-input:focus,
.uh-field-textarea:focus,
.uh-field-select:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.uh-field-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.uh-field-description {
    margin-top: 6px;
    font-size: 13px;
    color: #718096;
    line-height: 1.5;
}

.uh-checkbox-label,
.uh-radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-weight: normal;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.uh-checkbox-label:hover,
.uh-radio-label:hover {
    background-color: #f7fafc;
}

.uh-field-checkbox,
.uh-field-radio {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.uh-field-file {
    width: 100%;
    padding: 12px;
    cursor: pointer;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background-color: #fafbfc;
    transition: all 0.3s ease;
    font-size: 14px;
}

.uh-field-file:hover {
    border-color: #0073aa;
    background-color: #f0f9ff;
}

.uh-field-file:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* File input styling */
.uh-field-file::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.uh-field-file::file-selector-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
}

.uh-button {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
}

.uh-button-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.uh-button-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a6f 100%);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4);
    transform: translateY(-2px);
}

.uh-button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.uh-button-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.uh-button-secondary {
    background-color: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    margin-left: 12px;
}

.uh-button-secondary:hover {
    background-color: #edf2f7;
    border-color: #cbd5e0;
}

.uh-form-actions {
    margin-top: 32px;
    text-align: center;
}

.uh-message {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 8px;
    display: none;
    font-size: 15px;
    line-height: 1.6;
    animation: slideIn 0.3s ease;
}

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

.uh-message.uh-success {
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
    display: block;
}

.uh-message.uh-success::before {
    content: "✓ ";
    font-weight: bold;
    font-size: 18px;
}

.uh-message.uh-error {
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.uh-message.uh-error::before {
    content: "⚠ ";
    font-weight: bold;
    font-size: 18px;
}

.uh-message.uh-info {
    background-color: #d1ecf1;
    border: 2px solid #bee5eb;
    color: #0c5460;
    display: block;
}

.uh-message.uh-info::before {
    content: "ℹ ";
    font-weight: bold;
    font-size: 18px;
}

.uh-verification-wrapper .uh-verification-step {
    display: none;
}

.uh-verification-wrapper .uh-verification-step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.uh-code-input {
    text-align: center;
    font-size: 28px;
    letter-spacing: 12px;
    font-weight: 700;
    padding: 16px;
    font-family: 'Courier New', monospace;
}

.uh-honeypot {
    position: absolute;
    left: -9999px;
}

.uh-loading {
    opacity: 0.6;
    pointer-events: none;
}

.uh-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: uh-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes uh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress indicator for verification steps */
.uh-progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 12px;
}

.uh-progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s ease;
}

.uh-progress-step.active {
    background-color: #0073aa;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.uh-progress-step.completed {
    background-color: #48bb78;
    color: #ffffff;
}

.uh-progress-line {
    width: 60px;
    height: 3px;
    background-color: #e2e8f0;
    transition: all 0.3s ease;
}

.uh-progress-line.completed {
    background-color: #48bb78;
}

/* Responsive */
@media (max-width: 768px) {
    .uh-form-container {
        padding: 30px 20px;
        margin: 20px auto;
    }

    .uh-form-title {
        font-size: 24px;
    }

    .uh-button {
        width: 100%;
        margin-bottom: 10px;
    }

    .uh-button-secondary {
        margin-left: 0;
    }

    .uh-code-input {
        font-size: 24px;
        letter-spacing: 8px;
    }
}

/* Field validation states */
.uh-field-input.uh-invalid,
.uh-field-textarea.uh-invalid,
.uh-field-select.uh-invalid {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.uh-field-input.uh-invalid:focus,
.uh-field-textarea.uh-invalid:focus,
.uh-field-select.uh-invalid:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.uh-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.uh-field-error::before {
    content: "⚠";
}

/* Success state for verified fields */
.uh-field-input.uh-valid,
.uh-field-textarea.uh-valid,
.uh-field-select.uh-valid {
    border-color: #48bb78;
}

/* Loading overlay */
.uh-form-container.uh-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    z-index: 10;
}

/* Smooth transitions */
* {
    box-sizing: border-box;
}

.uh-form-container * {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
