/* 
 * Budget Request Form Styles
 * Styles for budget request forms (solicitar-presupuesto.php)
 * Author: Assistant
 * Date: 2025-11-18
 */

.budget-form-page {
    background: var(--background-neutral);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.form-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.prefill-notice {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--background-light);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

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

.required::after {
    content: ' *';
    color: var(--accent-color);
}

.urgency-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.urgency-option {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.urgency-option:hover {
    border-color: var(--accent-color);
    background: #fff5f2;
}

.urgency-option input[type="radio"] {
    display: none;
}

.urgency-option input[type="radio"]:checked + label {
    font-weight: bold;
}

.urgency-option.selected {
    border-color: var(--accent-color);
    background: #fff5f2;
}

.file-upload {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: var(--accent-color);
    background: #fff5f2;
}

.file-upload input[type="file"] {
    display: none;
}

.file-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.file-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.file-preview-item button {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.submit-btn {
    width: 100%;
    background: var(--gradient-accent);
    color: var(--white);
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

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

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    margin-top: 8px;
    display: none;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--background-light);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--background-light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.search-result-category {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .form-card {
        padding: 20px;
    }
    
    .urgency-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--background-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
}

.error-modal .modal-header {
    border-bottom-color: #f8d7da;
}

.error-modal .modal-body {
    background: #fff5f7;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--background-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

