/*
 Theme Name:   Superio Child
 Theme URI:    https://themeforest.net/item/superio-job-board-wordpress-theme/32180231
 Description:  Superio Child Theme
 Author:       ApusTheme
 Author URI:   http://apusthemes.com
 Template:     superio
 Version:      1.0.0
 Text Domain:  superio-child
*/

/* ==========================================================================
   Employer Header — Cover Photo Overlay & Text Contrast
   ========================================================================== */

/* Overlay sombre sur la photo de couverture */
.candidate-detail-header.has-cover-photo {
    position: relative;
    background-size: cover;
    background-position: center center;
}
.candidate-detail-header.has-cover-photo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}
.candidate-detail-header.has-cover-photo > .container {
    position: relative;
    z-index: 1;
}

/* Texte blanc avec ombre pour lisibilité sur cover photo */
.candidate-detail-header.has-cover-photo .candidate-title,
.candidate-detail-header.has-cover-photo .candidate-metas,
.candidate-detail-header.has-cover-photo .candidate-metas a,
.candidate-detail-header.has-cover-photo .candidate-metas i,
.candidate-detail-header.has-cover-photo .candidate-metas-bottom,
.candidate-detail-header.has-cover-photo .candidate-information {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.candidate-detail-header.has-cover-photo .candidate-metas a:hover,
.candidate-detail-header.has-cover-photo .candidate-metas a:focus {
    color: #e0e0e0;
}

/* Mobile: overlay plus fort + padding ajusté */
@media (max-width: 767px) {
    .candidate-detail-header.has-cover-photo::before {
        background: rgba(0, 0, 0, 0.65);
    }
    .candidate-detail-header.has-cover-photo {
        padding: 25px 0;
    }
    .candidate-detail-header.has-cover-photo .candidate-metas > * {
        display: block;
        margin-bottom: 5px;
    }
}

/* ==========================================================================
   Portfolio Photos — Mobile grid fix
   ========================================================================== */

/* ==========================================================================
   AI Recommendations - Icon + Modal
   ========================================================================== */

.ai-profile-card {
    position: relative;
}

/* AI Score Icon (on cards) */
.ai-score-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #e8e8e8;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    pointer-events: auto;
}

.ai-score-icon--ready {
    background: linear-gradient(135deg, #ff8a1d, #ff8a1d);
    color: #050c24;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(255, 138, 29, 0.35);
    animation: ai-icon-pulse 0.4s ease;
}

.ai-score-icon--ready:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(255, 138, 29, 0.5);
}

.ai-score-icon--absolute {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

@keyframes ai-icon-pulse {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* Modal overlay */
.ai-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.ai-modal-overlay.ai-modal-visible {
    display: flex;
}

.ai-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 340px;
    max-width: 90vw;
    position: relative;
    animation: ai-modal-in 0.25s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

@keyframes ai-modal-in {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.ai-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.ai-modal-close:hover {
    color: #333;
}

.ai-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #202124;
    font-weight: 600;
    font-size: 15px;
}
.ai-modal-header svg {
    color: #a64f00;
}

/* Score display inside modal */
.ai-modal-score {
    text-align: center;
}

.ai-modal-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.ai-modal-gauge-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid;
}

.ai-modal-gauge-circle.high {
    border-color: #22c55e;
    background: #f0fdf4;
}

.ai-modal-gauge-circle.medium {
    border-color: #f59e0b;
    background: #fffbeb;
}

.ai-modal-gauge-circle.low {
    border-color: #ef4444;
    background: #fef2f2;
}

.ai-modal-gauge-value {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
}

.ai-modal-gauge-label {
    font-size: 13px;
    font-weight: 600;
}

.ai-modal-gauge-label.high   { color: #22c55e; }
.ai-modal-gauge-label.medium { color: #f59e0b; }
.ai-modal-gauge-label.low    { color: #ef4444; }

.ai-modal-reason {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px solid #f0f0f0;
}

/* Loading state */
.ai-modal-loading {
    text-align: center;
    padding: 20px 0;
    color: #888;
}

.ai-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #ff8a1d;
    border-radius: 50%;
    animation: ai-spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

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

/* Premium locked state */
.ai-modal-locked {
    text-align: center;
    padding: 10px 0;
}

.ai-modal-lock-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.ai-modal-locked p {
    color: #555;
    font-size: 14px;
    margin-bottom: 16px;
}

.ai-modal-upgrade-btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff8a1d, #ff8a1d);
    color: #050c24 !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.ai-modal-upgrade-btn:hover {
    opacity: 0.85;
}

/* Archive page card positioning */
article.candidate-card,
article.employer-card {
    position: relative;
}

/* Offset AI icon from bookmark button in list views */
.employer-list .ai-score-icon--absolute,
.candidate-list .ai-score-icon--absolute {
    right: 50px;
}

/* Place icon inside ali-right area on list views */
.candidate-list .ali-right .ai-score-icon,
.employer-list .ali-right .ai-score-icon {
    margin-right: 8px;
}

@media (max-width: 767px) {
    .ai-modal-content {
        width: 300px;
        padding: 22px;
    }
    .ai-score-icon--absolute {
        top: 6px;
        right: 6px;
    }
}
@media (max-width: 767px) {
    .candidate-detail-portfolio .row-portfolio .col-xs-6 {
        margin-bottom: 10px;
    }
}


/* ==========================================================================
   Candidate Header - Private Message icon button
   ==========================================================================
   Le parent definit .btn-action-icon (30x30px, border-radius 8px).
   On surcharge ici pour obtenir un cercle 50x50 coherent avec .btn-follow
   (bouton shortlist) et on ajoute la marge comme .btn-invite-candidate. */

.candidate-detail-header .candidate-detail-buttons .btn-action-icon.send-private-message-btn,
.candidate-single-v2 .candidate-detail-buttons .btn-action-icon.send-private-message-btn {
    width: 50px !important;
    height: 50px !important;
    line-height: 50px !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    margin-left: 20px !important;
    text-decoration: none !important;
    overflow: hidden;
}
.rtl .candidate-detail-header .candidate-detail-buttons .btn-action-icon.send-private-message-btn,
.rtl .candidate-single-v2 .candidate-detail-buttons .btn-action-icon.send-private-message-btn {
    margin-left: 0 !important;
    margin-right: 20px !important;
}

/* Mobile */
@media (max-width: 767px) {
    .candidate-detail-header .candidate-detail-buttons .btn-action-icon.send-private-message-btn,
    .candidate-single-v2 .candidate-detail-buttons .btn-action-icon.send-private-message-btn {
        margin: 10px 0 0 10px !important;
    }
}

/* ==========================================================================
   Candidate resume - rich-text descriptions (education / experience / award)
   ==========================================================================
   Rendu par novelstep_resume_rich_text() (inc/candidate-resume-rich-text.php).
   Le wrapper est un <div> (et non plus <p>) car il peut contenir des listes. */

.my_resume_eduarea .candidate-rich-description p {
    margin: 0 0 8px;
}
.my_resume_eduarea .candidate-rich-description ul,
.my_resume_eduarea .candidate-rich-description ol {
    margin: 0 0 8px;
    padding-left: 20px;
}
.my_resume_eduarea .candidate-rich-description ul {
    list-style: disc;
}
.my_resume_eduarea .candidate-rich-description ol {
    list-style: decimal;
}
.my_resume_eduarea .candidate-rich-description li {
    margin-bottom: 4px;
}
.my_resume_eduarea .candidate-rich-description > :last-child {
    margin-bottom: 0;
}
.rtl .my_resume_eduarea .candidate-rich-description ul,
.rtl .my_resume_eduarea .candidate-rich-description ol {
    padding-left: 0;
    padding-right: 20px;
}

/* ==========================================================================
   Messagerie - en-tête de conversation (candidat et employeur)
   ==========================================================================
   Bloc .recipient-info (avatar, nom, sujet, suppression) rendu par
   superio/wp-private-message/reply-section.php, commun aux deux rôles.
   Même fond que l'élément actif du menu latéral (orange à 10 %). */

.message-section-wrapper .recipient-info {
    background-color: var(--superio-theme-color-01);
    border-bottom: 2px solid var(--superio-theme-color);
    /* La carte parente a un rayon de 8px et une bordure de 1px. */
    border-radius: 7px 7px 0 0;
}

/* ==========================================================================
   Dashboard - en-têtes « titre + bouton » sur mobile
   ==========================================================================
   Le parent met le titre et le bouton (.ali-right) sur une seule ligne flex
   sans retour à la ligne, et .btn est en white-space: nowrap. Sur mobile,
   un libellé long fait déborder le bouton hors de l'écran par-dessus le
   titre (ex. « Tests de personnalité » côté employeur).
   Sous 768px : titre en haut, bouton en dessous, texte du bouton sécable. */

@media (max-width: 767px) {
    .box-dashboard-wrapper > .widget-title.flex-middle {
        flex-wrap: wrap;
        row-gap: 12px;
    }
    .box-dashboard-wrapper > .widget-title.flex-middle > .ali-right {
        flex-basis: 100%;
        margin-left: 0;
        margin-right: 0;
        text-align: start;
    }
    .box-dashboard-wrapper > .widget-title.flex-middle > .ali-right .btn {
        white-space: normal;
    }
}
