/* Upward Job Listings Styles */

.upward-job-search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.search-row.mobile-layout {
    grid-template-columns: 1fr;
    gap: 15px;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.search-field input,
.search-field select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.search-submit {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.search-submit button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.search-submit button:hover {
    background: #005a87;
}

.clear-search-btn {
    background: #6c757d !important;
}

.clear-search-btn:hover {
    background: #545b62 !important;
}

.detect-location-btn {
    background: #28a745 !important;
    font-size: 14px !important;
    padding: 8px 16px !important;
}

.detect-location-btn:hover {
    background: #218838 !important;
}

/* Results Styles */
.upward-job-results {
    margin-top: 20px;
}

.upward-results-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #e9ecef;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.upward-results-info p {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.upward-job-list {
    display: grid;
    gap: 20px;
}

.upward-job-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.upward-job-item:hover,
.upward-job-item.hovered {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007cba;
    transform: translateY(-2px);
}

.job-header {
    margin-bottom: 15px;
}

.job-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    line-height: 1.3;
}

.job-title a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.job-title a:hover {
    color: #005a87;
    text-decoration: underline;
}

.job-company {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.job-location,
.job-date {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.location-icon,
.date-icon {
    font-size: 12px;
}

.job-snippet {
    margin: 15px 0;
    color: #555;
    line-height: 1.5;
    border-left: 3px solid #f0f0f0;
    padding-left: 15px;
}

.job-snippet p {
    margin-bottom: 10px;
}

.job-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.job-apply-btn {
    display: inline-block;
    background: #007cba;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.job-apply-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Loading and Error States */
.upward-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.upward-loading::before {
    content: "⟳";
    display: inline-block;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.upward-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.upward-no-results {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    text-align: center;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .upward-job-search-form {
        padding: 15px;
    }
    
    .job-title {
        font-size: 18px;
    }
    
    .search-submit {
        flex-direction: column;
    }
    
    .search-submit button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .upward-job-item {
        padding: 15px;
    }
    
    .job-title {
        font-size: 16px;
    }
    
    .job-company {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .upward-job-search-form {
        display: none;
    }
    
    .upward-job-item {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }
    
    .job-apply-btn {
        display: none;
    }
}