/**
 * FS Support Tickets - Public Form Styles
 * Matches Freelance Studio design system
 */

/* Variables */
:root {
    --fst-primary: #3ECFB2;
    --fst-primary-dark: #2BA891;
    --fst-primary-light: #77D5C9;
    --fst-primary-xtralight: #E0F7F3;
    --fst-secondary: #81A5DF;
    --fst-secondary-dark: #5D4E80;
    --fst-accent: #FFA26E;
    --fst-danger: #E85A5A;
    --fst-gray-100: #F5F7FA;
    --fst-gray-200: #EEF1F5;
    --fst-gray-300: #E2E6EC;
    --fst-gray-400: #C5CAD3;
    --fst-gray-500: #9CA3AF;
    --fst-gray-600: #6B7280;
    --fst-gray-700: #4B5563;
    --fst-gray-800: #374151;
    --fst-border-radius: 8px;
    --fst-border-radius-lg: 12px;
    --fst-shadow: 0 2px 8px rgba(123, 104, 166, 0.08);
    --fst-shadow-md: 0 4px 12px rgba(123, 104, 166, 0.12);
}

/* ============================================
   Form Wrapper
   ============================================ */
.fst-support-form-wrap {
    max-width: 640px;
    margin: 0 auto;
}

.fst-support-form {
    background: #fff;
    border: 1px solid var(--fst-gray-200);
    border-radius: var(--fst-border-radius-lg);
    padding: 32px;
    box-shadow: var(--fst-shadow);
}

/* ============================================
   Form Groups
   ============================================ */
.fst-form-group {
    margin-bottom: 24px;
}

.fst-form-group:last-child {
    margin-bottom: 0;
}

.fst-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--fst-gray-700);
    margin-bottom: 6px;
}

.fst-required {
    color: var(--fst-danger);
}

.fst-optional {
    font-weight: 400;
    color: var(--fst-gray-500);
    font-size: 13px;
}

/* ============================================
   Inputs
   ============================================ */
.fst-input,
.fst-select,
.fst-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--fst-gray-300);
    border-radius: var(--fst-border-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--fst-gray-800);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.fst-input:hover,
.fst-select:hover,
.fst-textarea:hover {
    border-color: var(--fst-gray-400);
}

.fst-input:focus,
.fst-select:focus,
.fst-textarea:focus {
    outline: none;
    border-color: var(--fst-primary);
    box-shadow: 0 0 0 3px rgba(62, 207, 178, 0.15);
}

.fst-input::placeholder,
.fst-textarea::placeholder {
    color: var(--fst-gray-400);
}

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

.fst-select {
    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 d='M6 8L1 3h10z' fill='%239CA3AF'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================
   Character Counter
   ============================================ */
.fst-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--fst-gray-500);
    margin-top: 6px;
}

/* ============================================
   File Upload
   ============================================ */
.fst-file-upload {
    position: relative;
}

.fst-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.fst-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    border: 2px dashed var(--fst-gray-300);
    border-radius: var(--fst-border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.fst-file-label:hover {
    border-color: var(--fst-primary);
    background: var(--fst-primary-xtralight);
}

.fst-file-label.has-file {
    border-color: var(--fst-primary);
    background: var(--fst-primary-xtralight);
    border-style: solid;
}

.fst-file-icon {
    font-size: 24px;
}

.fst-file-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--fst-gray-700);
}

.fst-file-hint {
    font-size: 12px;
    color: var(--fst-gray-500);
}

/* ============================================
   Submit Button
   ============================================ */
.fst-form-submit {
    padding-top: 8px;
}

.fst-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--fst-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fst-btn:hover {
    transform: translateY(-1px);
}

.fst-btn-primary {
    background: linear-gradient(135deg, var(--fst-primary) 0%, var(--fst-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(62, 207, 178, 0.3);
    width: 100%;
}

.fst-btn-primary:hover {
    background: linear-gradient(135deg, var(--fst-primary-dark) 0%, #239B85 100%);
    box-shadow: 0 4px 12px rgba(62, 207, 178, 0.4);
}

.fst-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Messages (Success / Error)
   ============================================ */
.fst-form-success {
    background: #fff;
    border: 1px solid var(--fst-primary-light);
    border-radius: var(--fst-border-radius-lg);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--fst-shadow);
}

.fst-success-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fst-primary) 0%, var(--fst-primary-dark) 100%);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.fst-form-success h3 {
    color: var(--fst-gray-800);
    margin: 0 0 12px 0;
    font-size: 20px;
}

.fst-form-success p {
    color: var(--fst-gray-600);
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.fst-form-success strong {
    font-family: monospace;
    color: var(--fst-primary-dark);
    font-size: 16px;
}

.fst-form-error {
    background: #FFE5E5;
    color: #C53030;
    border: 1px solid #FCA5A5;
    border-radius: var(--fst-border-radius);
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* ============================================
   Honeypot (hidden)
   ============================================ */
.fst-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ============================================
   High Contrast Mode
   ============================================ */
.fst-high-contrast .fst-btn-primary {
    background: #000;
    color: #fff;
    box-shadow: none;
}

.fst-high-contrast .fst-input:focus,
.fst-high-contrast .fst-select:focus,
.fst-high-contrast .fst-textarea:focus {
    outline: 3px solid #000;
    box-shadow: none;
}

.fst-high-contrast .fst-file-label:hover,
.fst-high-contrast .fst-file-label.has-file {
    outline: 3px solid #000;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .fst-support-form {
        padding: 20px;
        border-radius: var(--fst-border-radius);
    }

    .fst-form-success {
        padding: 28px 20px;
    }
}
