/**
 * TTD Support — Frontend Ticket Form
 * Matches The Tech Desk theme
 * v1.7.0
 */

.ttd-support-form-wrap {
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.ttd-support-form-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    border-radius: 16px 16px 0 0;
    padding: 40px 36px 32px;
    text-align: center;
}

.ttd-support-form-icon svg {
    width: 48px;
    height: 48px;
    stroke: #ffe605;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 12px rgba(255, 231, 1, 0.4));
}

.ttd-support-form-header h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}

.ttd-support-form-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Form Body */
.ttd-support-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 36px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Form Rows */
.ttd-support-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.ttd-support-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Fields */
.ttd-support-field {
    margin-bottom: 20px;
}

.ttd-support-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.ttd-support-field label .required {
    color: #ef4444;
}

.ttd-support-field input[type="text"],
.ttd-support-field input[type="email"],
.ttd-support-field input[type="tel"],
.ttd-support-field select,
.ttd-support-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a2e;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.ttd-support-field input:focus,
.ttd-support-field select:focus,
.ttd-support-field textarea:focus {
    outline: none;
    border-color: #ffe605;
    box-shadow: 0 0 0 3px rgba(255, 231, 1, 0.2);
}

.ttd-support-field textarea {
    resize: vertical;
    min-height: 120px;
}

.ttd-support-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.ttd-support-field ::placeholder {
    color: #9ca3af;
}

/* File Upload */
.ttd-support-file-upload {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.ttd-support-file-upload:hover {
    border-color: #ffe605;
    background: #fffef0;
}

.ttd-support-file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ttd-support-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.ttd-support-file-label svg {
    stroke: #9ca3af;
}

.ttd-support-file-name {
    font-size: 13px;
    color: #c5a800;
    font-weight: 600;
    margin-top: 4px;
}

.ttd-support-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 6px 0 0;
}

/* Submit Button */
.ttd-support-form-actions {
    margin-top: 8px;
}

.ttd-support-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, #ffe605 0%, #ff8a00 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    width: 100%;
    justify-content: center;
    font-family: inherit;
}

.ttd-support-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 231, 1, 0.35);
}

.ttd-support-submit-btn:active {
    transform: translateY(0);
}

.ttd-support-btn-loading svg {
    animation: ttd-spin 1s linear infinite;
}

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

/* Messages */
.ttd-support-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.ttd-support-message-success {
    background: #fffef0;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ttd-support-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ttd-support-message .ttd-ticket-ref {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: #fef3c7;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 700;
    font-size: 15px;
    color: #92400e;
}

/* Human Verification Checkbox */
.ttd-support-human-check {
    margin-top: 8px;
    margin-bottom: 4px;
}

/* Login Required */
.ttd-support-login-required {
    max-width: 720px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 48px 36px;
    text-align: center;
}

.ttd-support-login-required p {
    font-size: 16px;
    color: #4b5563;
}

.ttd-support-login-required a {
    color: #c5a800;
    font-weight: 600;
    text-decoration: none;
}

.ttd-support-login-required a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .ttd-support-form-wrap {
        margin: 0 16px;
    }

    .ttd-support-form-header {
        padding: 28px 24px 24px;
    }

    .ttd-support-form-header h2 {
        font-size: 22px;
    }

    .ttd-support-form {
        padding: 24px 20px;
    }

    .ttd-support-form-row-2 {
        grid-template-columns: 1fr;
    }
}
