/**
 * Nitaim Document Retrieval - Form Styles
 * Design: Soft & Friendly - Green accents, rounded corners, soft shadows
 */

/* Container */
.nitaim-docs-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.75rem;
    font-family: 'Heebo', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Form */
.nitaim-docs-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Field */
.nitaim-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nitaim-form-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
}

.nitaim-form-field .required {
    color: #e53e3e;
}

.nitaim-form-field input {
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.2s;
    outline: none;
    background: #f7fafc;
    text-align: right;
    direction: rtl;
}

.nitaim-form-field input:focus {
    border-color: #68d391;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(104, 211, 145, 0.15);
}

.nitaim-form-field input.valid {
    border-color: #68d391;
}

.nitaim-form-field input.invalid {
    border-color: #e53e3e;
}

.field-hint {
    font-size: 0.7rem;
    color: #a0aec0;
    margin-top: 0.1rem;
}

/* Submit Button - Green gradient */
.nitaim-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #68d391 0%, #38a169 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

.nitaim-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(56, 161, 105, 0.4);
}

.nitaim-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Button Spinner */
.btn-spinner {
    display: inline-flex;
    align-items: center;
}

.spinner-icon {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Results Container */
.nitaim-docs-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    direction: rtl;
    text-align: right;
}

/* Loading State */
.results-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #68d391;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.results-loading p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
}

/* Results Content */
.results-content {
    animation: fadeIn 0.3s ease-out;
}

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

/* Results Header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #38a169;
    direction: rtl;
}

.results-icon {
    width: 20px;
    height: 20px;
}

/* Files List */
.files-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    direction: rtl;
    transition: all 0.2s;
}

.file-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.file-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #68d391;
}

.file-name {
    font-size: 0.9rem;
    color: #2d3748;
    word-break: break-word;
    text-align: right;
}

/* Download Button */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #68d391 0%, #38a169 100%);
    border-radius: 12px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.25);
}

.btn-download:hover {
    background: linear-gradient(135deg, #48bb78 0%, #2f855a 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.35);
}

.btn-download svg {
    width: 14px;
    height: 14px;
}

/* No Results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.no-results-icon {
    width: 48px;
    height: 48px;
    color: #a0aec0;
}

.no-results p {
    margin: 0;
    color: #4a5568;
}

/* Error Message */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 16px;
    text-align: center;
}

.error-icon {
    width: 32px;
    height: 32px;
    color: #e53e3e;
}

.error-message p {
    margin: 0;
    color: #c53030;
}

/* Privacy Notice - תיקון 13 */
.nitaim-privacy-notice {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f0fff4 100%);
    border: 1px solid #e9d8fd;
    border-radius: 16px;
    font-size: 0.75rem;
    color: #553c9a;
    line-height: 1.6;
}

.nitaim-privacy-notice .privacy-title {
    margin: 0 0 0.4rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: #6b46c1;
}

.nitaim-privacy-notice .privacy-details {
    margin: 0;
    padding-right: 1.1rem;
    list-style-type: disc;
}

.nitaim-privacy-notice .privacy-details li {
    margin-bottom: 0.2rem;
}

.nitaim-privacy-notice .privacy-details li:last-child {
    margin-bottom: 0;
}

/* Consent Checkbox */
.nitaim-consent-field {
    margin-top: 0.75rem;
}

.nitaim-consent-field .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.5;
}

.nitaim-consent-field input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #68d391;
}

.nitaim-consent-field .consent-text {
    color: #4a5568;
}

.nitaim-consent-field .consent-text .required {
    color: #e53e3e;
}

/* Responsive */
@media (max-width: 600px) {
    .nitaim-docs-container {
        padding: 1.25rem;
        border-radius: 16px;
        margin: 0 0.5rem;
    }

    .file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .file-info {
        justify-content: flex-start;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}
