/* Detalhe Emprego Styles */

/* Classe para centrar conteúdo com max-width */
.maxWidthSite {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
    box-sizing: border-box;
}

/* Job Hero Section */
.job-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 60vh;
}

.job-hero .hero-bg {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    display: block;
}

.job-hero .maxWidthSite {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    padding: 0 2rem;
}

.job-hero .job-card-main {
    position: relative;
    bottom: -18rem;
    background: #f0f0f0;
    border-radius: 0 !important;
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* When banner is present, remove bottom padding from card so banner sits flush */
.job-hero .job-card-main:has(.job-inactive-banner) {
    padding-bottom: 0;
}

.job-hero .job-card-main .job-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.job-hero .job-card-main h2 {
    font-size: 1.6rem;
    color: #000;
    font-weight: 700;
    margin: 0;
}

.job-hero .job-card-main .location-text {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.job-hero .job-card-main .job-card-right {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

.job-hero .job-card-main .share-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 9999px;
    flex-shrink: 0;
}

.job-hero .job-card-main .share-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0);
    transition: opacity 0.2s ease;
}

.job-hero .job-card-main .share-btn:hover img {
    opacity: 0.7;
}

.job-hero .job-card-main .share-dropdown {
    position: relative;
    display: flex;
    flex-shrink: 0;
    z-index: 30;
}

.job-hero .job-card-main .share-dropdown.is-open .share-btn {
    opacity: 0.8;
}

.job-hero .job-card-main .share-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 9999;
    min-width: 180px;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.job-hero .job-card-main .share-dropdown.is-open .share-dropdown-menu {
    display: flex;
}

.job-hero .job-card-main .share-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: #111827;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.job-hero .job-card-main .share-dropdown-menu a:hover {
    background: #f3f4f6;
}

.job-hero .job-card-main .share-dropdown-menu img {
    width: 18px;
    height: 18px;
}

.job-hero .job-card-main .share-dropdown-menu span {
    font-size: 0.95rem;
    font-weight: 500;
}

.job-hero .job-card-main .separator {
    width: 1px;
    height: 40px;
    background: #ccc;
}

.job-hero .job-card-main .apply-btn {
    background: #4754f0;
    color: #fff;
    border: none;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.job-hero .job-card-main .apply-btn:hover {
    background: #3644e0;
}

/* Disabled state for inactive job offers */
.job-hero .job-card-main .apply-btn--disabled,
.job-hero .job-card-main .apply-btn--disabled:hover {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
}

.job-hero .job-card-main .apply-btn-wrapper--disabled {
    position: relative;
    display: inline-block;
    cursor: not-allowed;
}

.job-hero .job-card-main .apply-btn-wrapper--disabled::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.job-hero .job-card-main .apply-btn-wrapper--disabled:hover::after {
    opacity: 1;
}

/* Hide old job-info section */
.job-hero .job-info {
    display: none;
}

@media (max-width: 768px) {
    .job-hero {
        height: auto;
        min-height: 40vh;
        overflow: visible;
    }

    .job-hero .hero-bg {
        height: 40vh;
    }

    .job-hero .maxWidthSite {
        position: relative;
        left: 0;
        transform: none;
        padding: 0 1rem;
        height: auto;
    }

    .job-hero .job-card-main {
        position: relative;
        left: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        margin-top: -3rem;
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        z-index: 40;
        overflow: visible;
    }

    .job-hero .job-card-main .job-card-left {
        width: 100%;
    }

    .job-hero .job-card-main h2 {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .job-hero .job-card-main .location-text {
        font-size: 0.85rem;
    }

    .job-hero .job-card-main .job-card-right {
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
        position: relative;
        z-index: 50;
        overflow: visible;
    }

    .job-hero .job-card-main .separator {
        height: 30px;
        flex-shrink: 0;
    }

    .job-hero .job-card-main .apply-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        flex: 1;
        text-align: center;
    }

    .job-hero .job-card-main .share-dropdown-menu {
        left: 0;
        right: auto;
        z-index: 99999;
    }
}

@media (max-width: 480px) {
    .job-hero {
        min-height: 35vh;
    }

    .job-hero .hero-bg {
        height: 35vh;
    }

    .job-hero .maxWidthSite {
        padding: 0 0.75rem;
    }

    .job-hero .job-card-main {
        padding: 1rem;
        margin-top: -2rem;
    }

    .job-hero .job-card-main h2 {
        font-size: 1rem;
    }

    .job-hero .job-card-main .location-text {
        font-size: 0.8rem;
    }

    .job-hero .job-card-main .apply-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .job-hero .job-card-main .share-btn img {
        width: 20px;
        height: 20px;
    }
}

/* Inactive Job Banner — inside job-card-main, full width strip */
.job-hero .job-card-main .job-inactive-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: calc(100% + 4rem); /* compensate for parent's 2rem padding on each side */
    margin: 0 -2rem -0px;
    background-color: #fef3c7;
    border-top: 3px solid #f59e0b;
    padding: 0.85rem 1.25rem;
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 500;
    box-sizing: border-box;
}

.job-hero .job-card-main .job-inactive-banner svg {
    flex-shrink: 0;
    color: #d97706;
}

.job-hero .job-card-main .job-inactive-banner p {
    margin: 0;
    line-height: 1.5;
}

.job-hero .job-card-main .job-inactive-banner a {
    color: #92400e;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.job-hero .job-card-main .job-inactive-banner a:hover {
    color: #78350f;
}

/* Job Details Section */
.job-details {
    padding: 4rem 0;
}

.job-details .maxWidthSite {
    display: flex;
    gap: 15rem;
}

.job-details .left {
    flex: 2;
}

.job-details .left .block {
    margin-bottom: 2rem;
}

.job-details .left .block h3 {
    color: #000;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.job-details .left .block p {
    color: #333;
    line-height: 1.6;
}

.job-details .left .block .cta-btn {
    margin-top: 1.5rem;
    background: #1736ff;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

/* Disabled state for inactive job offers */
.job-details .left .block .cta-btn--disabled,
.job-details .left .block .cta-btn--disabled:hover {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
}

.job-details .left .block .apply-btn-wrapper--disabled {
    position: relative;
    display: inline-block;
    cursor: not-allowed;
    margin-top: 1.5rem;
}

.job-details .left .block .apply-btn-wrapper--disabled .cta-btn--disabled {
    margin-top: 0;
}

.job-details .left .block .apply-btn-wrapper--disabled::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.job-details .left .block .apply-btn-wrapper--disabled:hover::after {
    opacity: 1;
}

.job-details .right {
    flex: 1;
}

.job-details .right .details-box {
    background: #fff;
    margin-bottom: 2rem;
}

.job-details .right .details-box h4 {
    color: #000;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.job-details .right .details-box .progress {
    background: #eee;
    height: 6px;
    margin-bottom: 1rem;
}

.job-details .right .details-box .progress .bar {
    width: 60%;
    height: 100%;
    background: #22c322;
}

.job-details .right .details-box ul {
    list-style: none;
    padding: 0;
}

.job-details .right .details-box ul li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.job-details .right .details-box ul li span {
    color: #333;
}

.job-details .right .details-box ul li b {
    color: #000000;
}

.job-details .right .tags-box {
    margin-bottom: 1.5rem;
}

.job-details .right .tags-box h4 {
    color: #000;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.job-details .right .tags-box .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.job-details .right .tags-box .tags .tag {
    padding: 0.3rem 1rem;
    color: white;
    font-size: 0.9rem;
}

.job-details .right .tags-box .tags .tag.green {
    background: #22c322;
}

.job-details .right .tags-box .tags .tag.blue {
    background: #1736ff;
}

.job-details .right .tags-box .tags .tag.orange {
    background: #ff9500;
}

.job-details .right .tags-box .tags .tag.purple {
    background: #9b59b6;
}

.job-details .right .tags-box .tags .tag.red {
    background: #e74c3c;
}

.job-details .right .tags-box .tags .tag.teal {
    background: #1abc9c;
}

.job-details .right .tags-box .tags.outlined span {
    border: 1px solid #1736ff;
    color: #1736ff;
    padding: 0.3rem 0.8rem;
}

.job-details .right .reference {
    margin-top: 1.5rem;
}

.job-details .right .reference span {
    color: #979696;
    font-size: 20px;
    font-weight: 600;
}

.job-details .right .reference b {
    display: block;
    color: #979696;
    font-weight: 400;
    margin-top: 0.2rem;
}

.job-details .right .share {
    margin-top: 2rem;
}

.job-details .right .share p {
    color: #000;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.job-details .right .share .icons {
    display: flex;
    gap: 0.8rem;
}

.job-details .right .share .icons a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.job-details .right .share .icons img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.job-details .right .share .icons a:hover img {
    opacity: 0.7;
}

@media (max-width: 900px) {
    .job-details .maxWidthSite {
        flex-direction: column;
    }

    .job-details .maxWidthSite {
        padding: 0 1rem;
    }

    .job-details .left,
    .job-details .right {
        width: 100%;
        padding: 1rem;
    }

    .job-details .right {
        margin-top: 0;
    }
}

/* CV Section Styles */
.cv-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f0f4ff;
    border: 1px solid #1736ff;
    border-radius: 8px;
}

.existing-cv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cv-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cv-icon {
    color: #1736ff;
}

.cv-label {
    font-weight: 600;
    color: #333;
}

.cv-filename {
    color: #666;
    font-size: 0.9rem;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #1736ff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.cv-download-btn:hover {
    background: #0f2acc;
}

.attach-btn-secondary {
    background: transparent !important;
    color: #1736ff !important;
    border: 1px solid #1736ff !important;
    margin-top: 0.5rem;
}

.attach-btn-secondary:hover {
    background: #f0f4ff !important;
}

.cv-filename-display {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #e8f5e9;
    border-radius: 4px;
    color: #2e7d32;
    font-size: 0.9rem;
}

#new-cv-upload {
    margin-top: 0.5rem;
}

#new-cv-upload input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px dashed #1736ff;
    border-radius: 4px;
}

/* Form feedback messages */
.form-message {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #dc2626;
}

.form-success {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    color: #16a34a;
}

.field-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: #ef4444;
}

.form-group.has-error .attach-btn {
    border-color: #ef4444;
    color: #dc2626;
}

.form-group label .required {
    color: #dc2626;
    font-weight: bold;
}

/* Submit button states */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* Success Modal */
.success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.success-overlay.active {
    display: flex;
}

.success-modal {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    margin: 1rem;
    animation: fadeInUp 0.3s ease;
}

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

.success-icon {
    color: #22c55e;
    margin-bottom: 1.5rem;
}

.success-modal h3 {
    color: #1736ff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.success-modal p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.success-btn {
    background: #1736ff;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.success-btn:hover {
    background: #0f2acc;
}

/* Already Applied Modal */
.already-applied-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.already-applied-overlay.active {
    display: flex;
}

.already-applied-modal {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    max-width: 450px;
    margin: 1rem;
    animation: fadeInUp 0.3s ease;
}

.already-applied-icon {
    color: #3b82f6;
    margin-bottom: 1.5rem;
}

.already-applied-modal h3 {
    color: #1736ff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.already-applied-modal p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.already-applied-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.already-applied-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    text-align: center;
}

.already-applied-btn--primary {
    background: #1736ff;
    color: white;
    border: none;
}

.already-applied-btn--primary:hover {
    background: #0f2acc;
}

.already-applied-btn--secondary {
    background: transparent;
    color: #666;
    border: 1px solid #d1d5db;
}

.already-applied-btn--secondary:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

/* Candidatura Espontânea */
.candidatura-espontanea {
    margin-top: 60px;
    text-align: left;
}

.btn-candidatura-espontanea {
    display: inline-block;
    width: 50%;
    background: #2ecc40;
    color: #fff;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.btn-candidatura-espontanea:hover {
    background: #27ae35;
    transform: translateY(-2px);
}

