/**
 * Job Engine Plugin Styles
 * Global styles for job board functionality
 */

/* Reset and base styles */
.cl-job-engine * {
    box-sizing: border-box;
}

/* Job card icon styling - using CSS icons instead of emojis for consistency */
.job-meta-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.job-meta-icon.location::before {
    content: "📍";
    font-size: 16px;
}

.job-meta-icon.salary::before {
    content: "💰";
    font-size: 16px;
}

.job-meta-icon.type::before {
    content: "🕒";
    font-size: 16px;
}

.job-meta-icon.home::before {
    content: "🏠";
    font-size: 16px;
}

.job-meta span {
    font-size: 0.9em;
}

/* Loading states */
.cl-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cl-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FEC12C;
    border-radius: 50%;
    animation: cl-spin 1s linear infinite;
}

@keyframes cl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form validation styles */
.cl-form-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.cl-error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.cl-success-message {
    color: #28a745;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Notification styles */
.cl-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    max-width: 400px;
    animation: cl-slideIn 0.3s ease-out;
}

.cl-notification.success {
    background-color: #28a745;
}

.cl-notification.error {
    background-color: #dc3545;
}

.cl-notification.info {
    background-color: #17a2b8;
}

@keyframes cl-slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .cl-hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .cl-hide-desktop {
        display: none !important;
    }
}

/* Admin dashboard styles */
.cl-admin-dashboard .card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cl-admin-dashboard .card h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

.cl-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cl-stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #FEC12C;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cl-stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #FEC12C;
    display: block;
}

.cl-stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Table styles */
.cl-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cl-table th,
.cl-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.cl-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.cl-table tr:hover {
    background-color: #f8f9fa;
}

.cl-table .status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.cl-table .status.new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.cl-table .status.contacted {
    background-color: #fff3e0;
    color: #f57c00;
}

.cl-table .status.qualified {
    background-color: #e8f5e8;
    color: #388e3c;
}

/* Button styles */
.cl-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cl-btn-primary {
    background-color: #FEC12C;
    color: white;
}

.cl-btn-primary:hover {
    background-color: #e0a800;
    color: white;
    text-decoration: none;
}

.cl-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.cl-btn-secondary:hover {
    background-color: #545b62;
    color: white;
    text-decoration: none;
}

.cl-btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* Accessibility improvements */
.cl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.cl-job-engine input:focus,
.cl-job-engine select:focus,
.cl-job-engine button:focus,
.cl-job-engine a:focus {
    outline: 2px solid #FEC12C;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cl-no-print {
        display: none !important;
    }
    
    .job-detail-page,
    .jobs-listing-page {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}