/**
 * Public styles for SendMeJob plugin
 *
 * @link       https://sendmejob.com
 * @since      1.0.0
 *
 * @package    SendMeJob
 * @subpackage SendMeJob/public/css
 */

/* CSS Variables for consistent theming */
:root {
    --sendmejob-primary: #2563eb;
    --sendmejob-primary-hover: #1d4ed8;
    --sendmejob-secondary: #64748b;
    --sendmejob-success: #10b981;
    --sendmejob-warning: #f59e0b;
    --sendmejob-danger: #ef4444;
    --sendmejob-light: #f8fafc;
    --sendmejob-dark: #1e293b;
    --sendmejob-border: #e2e8f0;
    --sendmejob-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sendmejob-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sendmejob-radius: 8px;
    --sendmejob-radius-lg: 12px;
    --sendmejob-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base container styles */
.sendmejob-jobs-container,
.sendmejob-submit-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--sendmejob-dark);
}

/* Jobs Display Widget Styles */
.sendmejob-jobs-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--sendmejob-radius-lg);
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: var(--sendmejob-shadow-lg);
    position: relative;
    overflow: hidden;
}

.sendmejob-jobs-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
                linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%), 
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    opacity: 0.1;
    pointer-events: none;
}

.sendmejob-jobs-list {
    display: grid;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.sendmejob-no-jobs {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--sendmejob-radius);
    backdrop-filter: blur(10px);
}

/* Job Card Styles */
.sendmejob-job-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--sendmejob-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--sendmejob-shadow);
    transition: var(--sendmejob-transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.sendmejob-job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--sendmejob-primary), var(--sendmejob-success));
    transition: var(--sendmejob-transition);
}

.sendmejob-job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.sendmejob-job-card:hover::before {
    width: 8px;
}

.sendmejob-job-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sendmejob-border);
}

.sendmejob-job-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sendmejob-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.sendmejob-job-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sendmejob-company {
    font-weight: 600;
    color: var(--sendmejob-secondary);
    font-size: 0.95rem;
}

.sendmejob-job-type {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sendmejob-job-type-remote {
    background: rgba(59, 130, 246, 0.1);
    color: var(--sendmejob-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.sendmejob-job-type-hybrid {
    background: rgba(168, 85, 247, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.sendmejob-job-type-onsite {
    background: rgba(16, 185, 129, 0.1);
    color: var(--sendmejob-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sendmejob-job-summary {
    color: var(--sendmejob-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sendmejob-job-details {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--sendmejob-light);
    border-radius: var(--sendmejob-radius);
    border-left: 4px solid var(--sendmejob-primary);
    animation: slideDown 0.3s ease-out;
}

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

.sendmejob-job-description {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.sendmejob-job-salary,
.sendmejob-job-location,
.sendmejob-job-contact {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.sendmejob-job-salary strong,
.sendmejob-job-location strong,
.sendmejob-job-contact strong {
    color: var(--sendmejob-dark);
    min-width: 80px;
}

.sendmejob-contact-link {
    color: var(--sendmejob-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--sendmejob-transition);
}

.sendmejob-contact-link:hover {
    color: var(--sendmejob-primary-hover);
    text-decoration: underline;
}

.sendmejob-job-date {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sendmejob-border);
}

.sendmejob-job-date small {
    color: var(--sendmejob-secondary);
    font-size: 0.85rem;
}

.sendmejob-job-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.sendmejob-expand-btn {
    background: transparent;
    border: 2px solid var(--sendmejob-primary);
    color: var(--sendmejob-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--sendmejob-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--sendmejob-transition);
    font-size: 0.9rem;
}

.sendmejob-expand-btn:hover {
    background: var(--sendmejob-primary);
    color: white;
    transform: translateY(-1px);
}

.sendmejob-apply-btn {
    background: linear-gradient(135deg, var(--sendmejob-primary), var(--sendmejob-primary-hover));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--sendmejob-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--sendmejob-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    box-shadow: var(--sendmejob-shadow);
}

.sendmejob-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.2);
    text-decoration: none;
    color: white;
}

/* View All Jobs Button */
.sendmejob-view-all-container {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.sendmejob-view-all-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sendmejob-transition);
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.sendmejob-view-all-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Submit Widget Styles */
.sendmejob-submit-container {
    background: white;
    border-radius: var(--sendmejob-radius-lg);
    padding: 2rem;
    box-shadow: var(--sendmejob-shadow-lg);
    border: 1px solid var(--sendmejob-border);
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.sendmejob-submit-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sendmejob-primary), var(--sendmejob-success), #8b5cf6);
}

.sendmejob-submit-form {
    display: grid;
    gap: 1.5rem;
}

.sendmejob-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sendmejob-label {
    font-weight: 600;
    color: var(--sendmejob-dark);
    font-size: 0.95rem;
}

.sendmejob-required {
    color: var(--sendmejob-danger);
    margin-left: 0.25rem;
}

.sendmejob-input,
.sendmejob-textarea,
.sendmejob-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--sendmejob-border);
    border-radius: var(--sendmejob-radius);
    font-size: 1rem;
    transition: var(--sendmejob-transition);
    background: white;
    font-family: inherit;
}

.sendmejob-input:focus,
.sendmejob-textarea:focus,
.sendmejob-select:focus {
    outline: none;
    border-color: var(--sendmejob-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sendmejob-textarea {
    resize: vertical;
    min-height: 100px;
}

.sendmejob-form-actions {
    margin-top: 1rem;
}

.sendmejob-submit-btn {
    background: linear-gradient(135deg, var(--sendmejob-primary), var(--sendmejob-primary-hover));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--sendmejob-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--sendmejob-transition);
    box-shadow: var(--sendmejob-shadow);
    position: relative;
    overflow: hidden;
}

.sendmejob-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.sendmejob-submit-btn:hover::before {
    left: 100%;
}

.sendmejob-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.2);
}

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

.sendmejob-form-message {
    padding: 1rem;
    border-radius: var(--sendmejob-radius);
    margin-top: 1rem;
    font-weight: 500;
}

.sendmejob-form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--sendmejob-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.sendmejob-form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--sendmejob-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Modal Styles */
.sendmejob-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sendmejob-modal-content {
    background: white;
    border-radius: var(--sendmejob-radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sendmejob-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--sendmejob-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--sendmejob-light), white);
}

.sendmejob-modal-header h2 {
    margin: 0;
    color: var(--sendmejob-dark);
    font-size: 1.5rem;
}

.sendmejob-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--sendmejob-secondary);
    transition: var(--sendmejob-transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.sendmejob-modal-close:hover {
    color: var(--sendmejob-danger);
    background: rgba(239, 68, 68, 0.1);
}

.sendmejob-modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.sendmejob-jobs-grid {
    display: grid;
    gap: 1.5rem;
}

.sendmejob-load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.sendmejob-load-more-btn {
    background: var(--sendmejob-secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--sendmejob-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--sendmejob-transition);
}

.sendmejob-load-more-btn:hover {
    background: var(--sendmejob-dark);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sendmejob-jobs-container,
    .sendmejob-submit-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .sendmejob-job-card {
        padding: 1rem;
    }
    
    .sendmejob-job-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .sendmejob-job-actions {
        flex-direction: column;
    }
    
    .sendmejob-expand-btn,
    .sendmejob-apply-btn {
        text-align: center;
        justify-content: center;
    }
    
    .sendmejob-modal-content {
        width: 95vw;
        margin: 1rem;
    }
    
    .sendmejob-modal-header,
    .sendmejob-modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .sendmejob-jobs-container,
    .sendmejob-submit-container {
        padding: 1rem;
    }
    
    .sendmejob-job-title {
        font-size: 1.1rem;
    }
    
    .sendmejob-submit-btn {
        width: 100%;
    }
}

/* Loading States */
.sendmejob-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Accessibility */
.sendmejob-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 keyboard navigation */
.sendmejob-expand-btn:focus,
.sendmejob-apply-btn:focus,
.sendmejob-submit-btn:focus,
.sendmejob-view-all-btn:focus,
.sendmejob-input:focus,
.sendmejob-textarea:focus,
.sendmejob-select:focus {
    outline: 2px solid var(--sendmejob-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sendmejob-job-actions,
    .sendmejob-view-all-container,
    .sendmejob-submit-container {
        display: none;
    }
    
    .sendmejob-job-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

