/*
Theme Name: Enggsol Theme
Theme URI: https://enggsol.com
Author: Enggsol Pte Ltd
Author URI: https://enggsol.com
Description: Professional Recruitment & HR Solutions theme for Enggsol.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: enggsol-theme
Tags: recruitment, hr, professional, business
*/

/* =============================================
   Base
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #ffffff;
    color: #1e293b;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; }

/* =============================================
   Hero Slider Animations
   ============================================= */
@keyframes fadeIn {
    0%   { opacity: 0; transform: scale(1.05); }
    10%  { opacity: 1; transform: scale(1); }
    33%  { opacity: 1; transform: scale(1); }
    43%  { opacity: 0; transform: scale(1.05); }
    100% { opacity: 0; }
}

.slide-1 { animation: fadeIn 15s infinite; animation-delay: 0s; }
.slide-2 { animation: fadeIn 15s infinite; animation-delay: 5s; }
.slide-3 { animation: fadeIn 15s infinite; animation-delay: 10s; }

/* =============================================
   Hero Curve Divider
   ============================================= */
.hero-curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 20;
}

.hero-curve svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.hero-curve .shape-fill { fill: #ffffff; }

/* =============================================
   AI Builder — Typing cursor
   ============================================= */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* =============================================
   AI Builder — Fade-in utility
   ============================================= */
.fade-in {
    animation: fadeInUp 0.5s ease-in forwards;
}

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

/* =============================================
   Mobile Menu
   ============================================= */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* =============================================
   AI Assistant — Typing dots
   ============================================= */
.ai-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.ai-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: aiDotBounce 1.3s ease-in-out infinite;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes aiDotBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

/* =============================================
   AI Assistant — Chat bubble slide-in
   ============================================= */
.chat-bubble-in {
    animation: chatSlideIn 0.25s ease-out forwards;
}

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

/* =============================================
   AI Assistant — Floating widget
   ============================================= */
#enggsol-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

#enggsol-chat-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    max-height: 520px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
}

#enggsol-chat-panel.panel-hidden {
    transform: scale(0.85);
    opacity: 0;
    pointer-events: none;
}

#enggsol-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(29,78,216,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
}

#enggsol-chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(29,78,216,0.5);
}

/* Chat messages scrollbar */
.chat-messages-area::-webkit-scrollbar { width: 4px; }
.chat-messages-area::-webkit-scrollbar-track { background: transparent; }
.chat-messages-area::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* =============================================
   Drop Resume Modal
   ============================================= */
#resume-modal {
    animation: none;
}
#resume-modal > div:last-child {
    animation: modalSlideUp 0.25s cubic-bezier(0.34,1.4,0.64,1) both;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =============================================
   Request Staff Modal
   ============================================= */
#staff-modal {
    animation: none;
}
#staff-modal > div:last-child {
    animation: modalSlideUp 0.25s cubic-bezier(0.34,1.4,0.64,1) both;
}

/* =============================================
   Markdown-ish: list inside AI message */
.ai-msg-content ul { list-style: disc; padding-left: 1.2em; margin: 6px 0; }
.ai-msg-content li { margin-bottom: 2px; }
.ai-msg-content strong { font-weight: 700; }
.ai-msg-content a { color: #3b82f6; text-decoration: underline; }

/* =============================================
   Single Job Listing — WP Job Manager overrides
   ============================================= */

/* Meta list (location, type, date, salary) */
.single_job_listing .job-listing-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.single_job_listing .job-listing-meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px;
}

.single_job_listing .job-listing-meta li.job-type {
    background: #eff6ff;
    color: #1d4ed8;
}

.single_job_listing .job-listing-meta li.salary {
    background: #f0fdf4;
    color: #15803d;
}

.single_job_listing .job-listing-meta li.listing-expired,
.single_job_listing .job-listing-meta li.position-filled {
    background: #fef2f2;
    color: #b91c1c;
}

/* Company info block */
.single_job_listing .company {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.single_job_listing .company img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Job description body */
.single_job_listing .job_description {
    color: #334155;
    line-height: 1.8;
    font-size: 0.9375rem;
}

.single_job_listing .job_description h2,
.single_job_listing .job_description h3,
.single_job_listing .job_description h4 {
    font-weight: 700;
    color: #0f172a;
    margin: 1.5rem 0 0.5rem;
}

.single_job_listing .job_description h2 { font-size: 1.25rem; }
.single_job_listing .job_description h3 { font-size: 1.1rem; }

.single_job_listing .job_description ul,
.single_job_listing .job_description ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.single_job_listing .job_description li { margin-bottom: 0.35rem; }

.single_job_listing .job_description p { margin: 0.75rem 0; }

/* Apply section */
.single_job_listing .job-manager-application-actions,
.single_job_listing .application {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.single_job_listing .job-manager-application-actions a,
.single_job_listing .application a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
}

.single_job_listing .job-manager-application-actions a:hover,
.single_job_listing .application a:hover {
    background: #1e40af;
}

/* Expired / access-denied notices */
.single_job_listing .job-manager-info {
    padding: 1rem 1.25rem;
    background: #fef9c3;
    border-left: 4px solid #ca8a04;
    border-radius: 0 6px 6px 0;
    color: #713f12;
    font-size: 0.9375rem;
}
