/* استایل‌های مینیمال و مدرن - جمع و جور */
.hirewire-form-wrapper {
    max-width: 480px;
    margin: 30px auto;
    padding: 16px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hirewire-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
}

.field-group .required {
    color: #ef4444;
    margin-right: 3px;
}

.field-group input,
.field-group select {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    font-size: 13px;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-group input:focus,
.field-group select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* File upload */
.file-upload-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-upload-wrapper input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-wrapper .file-upload-text {
    display: inline-block;
    padding: 10px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-upload-wrapper .file-upload-text:hover {
    background: #e5e7eb;
}

/* Checkbox and radio */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-group .option-label,
.radio-group .option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1f2937;
}

.checkbox-group input,
.radio-group input {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
}

/* Submit button */
.submit-group {
    text-align: left;
    margin-top: 12px;
}

.submit-button {
    padding: 10px 24px;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.submit-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.submit-button:active {
    transform: translateY(0);
}

/* Messages */
.error,
.success-message {
    padding: 10px;
    margin: 10px 6px;
    border-radius: 6px;
    font-size: 13px;
}

.error {
    background: #fef2f2;
    color: #b91c1c;
}

.success-message {
    background: #ecfdf5;
    color: #065f46;
}

/* Popup styles */
.hirewire-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.hirewire-popup-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    direction: rtl;
}

.hirewire-popup-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #1f2937;
}

.hirewire-popup-content h4 {
    margin: 10px 0 5px;
    font-size: 16px;
    color: #1f2937;
}

.hirewire-popup-content p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #4b5563;
}

.hirewire-popup-content a {
    color: #3b82f6;
    text-decoration: none;
}

.hirewire-popup-content a:hover {
    text-decoration: underline;
}

.hirewire-popup-close {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 20px;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.2s;
}

.hirewire-popup-close:hover {
    color: #ef4444;
}

/* Admin styles */
.hirewire-field {
    margin-bottom: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
}

.options-container {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option {
    display: flex;
    gap: 6px;
    align-items: center;
}

.option input {
    flex: 1;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.add-option,
.remove-option,
.hirewire-remove-field {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.add-option {
    background: #10b981;
    color: #ffffff;
}

.remove-option,
.hirewire-remove-field {
    background: #ef4444;
    color: #ffffff;
}

/* Modal for view */
.hirewire-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.hirewire-modal-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    direction: rtl;
}

/* Reply box in table */
.hirewire-reply-box {
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.hirewire-reply-box textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 10px;
}

.hirewire-reply-box .button {
    margin-left: 5px;
}

/* Track wrapper */
.hirewire-track-wrapper {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    direction: rtl;
}

.hirewire-track-wrapper h2 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 15px;
}

.hirewire-track-wrapper p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 10px;
}

.hirewire-track-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.hirewire-track-form label {
    font-size: 14px;
    color: #1f2937;
}

.hirewire-track-form input {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.hirewire-response {
    background: #f9fafb;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* استایل برای وضعیت */
.hirewire-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}
.hirewire-status.unread {
    background: #fef2f2;
    color: #b91c1c;
}
.hirewire-status.read {
    background: #fefce8;
    color: #854d0e;
}
.hirewire-status.replied {
    background: #ecfdf5;
    color: #065f46;
}

/* استایل برای لینک دانلود */
.hirewire-download-file {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
}
.hirewire-download-file:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hirewire-form-wrapper {
        max-width: 90%;
        padding: 12px;
    }
}