/**
 * TIS Legal Services - Frontend Form Styles
 */

/* Form Container */
.tis-legal-service-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.tis-form-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.tis-form-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.tis-form-description {
    color: #666;
    margin: 0;
}

/* Form Errors */
.tis-form-errors {
    background: #fff6f6;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #721c24;
}

.tis-form-errors ul {
    margin: 10px 0 0 20px;
}

/* Field Wrapper */
.tis-field-wrapper {
    margin-bottom: 20px;
}

.tis-field-wrapper:last-child {
    margin-bottom: 0;
}

/* Labels */
.tis-field-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.tis-required-indicator {
    color: #dc3545;
    margin-left: 3px;
}

/* Inputs */
.tis-field-input input[type="text"],
.tis-field-input input[type="email"],
.tis-field-input input[type="number"],
.tis-field-input input[type="date"],
.tis-field-input textarea,
.tis-field-input select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tis-field-input input:focus,
.tis-field-input textarea:focus,
.tis-field-input select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

/* Error State */
.tis-field-wrapper.has-error .tis-field-input input,
.tis-field-wrapper.has-error .tis-field-input textarea,
.tis-field-wrapper.has-error .tis-field-input select {
    border-color: #dc3545;
}

.tis-field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.tis-field-error:empty {
    display: none;
}

/* Help Text */
.tis-field-help {
    color: #666;
    font-size: 13px;
    margin: 5px 0 0 0;
}

/* Checkbox & Radio */
.tis-checkbox-group,
.tis-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tis-checkbox-label,
.tis-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.tis-checkbox-label input,
.tis-radio-label input {
    margin-right: 10px;
    width: auto;
}

/* File Upload */
.tis-file-upload-wrapper {
    position: relative;
}

.tis-file-upload-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.tis-file-dropzone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.tis-file-dropzone:hover,
.tis-file-dropzone.dragover {
    border-color: #2271b1;
    background: #f8f9fa;
}

.tis-dropzone-content .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #999;
    margin-bottom: 10px;
}

.tis-dropzone-content p {
    margin: 0 0 5px 0;
    color: #333;
}

.tis-dropzone-content small {
    color: #999;
}

.tis-file-list {
    margin: 15px 0 0 0;
    padding: 0;
    list-style: none;
}

.tis-file-list li {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.tis-file-list .file-name {
    flex-grow: 1;
    font-weight: 500;
}

.tis-file-list .file-size {
    color: #666;
    margin-right: 15px;
}

.tis-file-list .file-remove {
    color: #dc3545;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

/* Horizontal Layout */
.tis-form-layout-horizontal .tis-field-wrapper {
    display: flex;
    align-items: flex-start;
}

.tis-form-layout-horizontal .tis-field-label {
    flex: 0 0 200px;
    padding-right: 20px;
    padding-top: 10px;
    margin-bottom: 0;
}

.tis-form-layout-horizontal .tis-field-input {
    flex: 1;
}

/* Conditional Fields */
.tis-field-wrapper[data-conditional] {
    transition: opacity 0.3s, max-height 0.3s;
}

.tis-field-wrapper.tis-hidden {
    display: none;
}

/* Loading State */
.tis-form-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .tis-legal-service-form {
        padding: 15px;
        margin: 15px 0;
    }

    .tis-form-layout-horizontal .tis-field-wrapper {
        flex-direction: column;
    }

    .tis-form-layout-horizontal .tis-field-label {
        flex: none;
        padding-right: 0;
        padding-top: 0;
        margin-bottom: 8px;
    }

    .tis-file-dropzone {
        padding: 20px;
    }
}

/* My Account Styles */
.tis-my-account-requests {
    margin: 20px 0;
}

.tis-filter-bar {
    margin-bottom: 20px;
}

.tis-requests-table {
    width: 100%;
}

.tis-no-requests {
    text-align: center;
    padding: 40px;
    color: #666;
}

.tis-request-detail {
    margin: 20px 0;
}

.tis-back-link {
    margin-bottom: 20px;
}

.tis-request-info,
.tis-deliverables,
.tis-submitted-data {
    margin-bottom: 30px;
}

.tis-deliverables h3,
.tis-submitted-data h3 {
    margin-bottom: 15px;
}

.tis-deliverables-pending {
    background: #fff8e5;
    padding: 15px;
    border-radius: 4px;
    color: #856404;
}
