/* Greydot Jobs - Frontend Styles */
/* Matcher Greydot.dk's eksisterende design (Ejendelsregisteret/Hittegodscentralen kort) */

.greydot-jobs-heading {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 2.4rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #1a1a1a;
    margin: 0 0 32px 0 !important;
    letter-spacing: -0.01em;
}

.greydot-jobs-listing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 30px;
    width: 100%;
    max-width: 100%;
}

/* Job Cards - matcher sidens eksisterende kort-stil */
.greydot-job-card {
    background: #f4fafa;
    border: 1px solid #e0eded;
    border-radius: 20px;
    padding: 35px 30px;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.greydot-job-btn-wrap {
    text-align: right !important;
    width: 100% !important;
    margin-top: 8px;
}

.greydot-job-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Alle kort samme højde - indhold fylder, knap sidder i bunden */
.greydot-job-card .greydot-job-short-desc {
    flex: 1;
}

.greydot-job-card--unsolicited {
    background: #eaf3f3 !important;
}

.greydot-job-card--unsolicited::before {
    content: "Uopfordret ansøgning";
    position: absolute;
    top: 0;
    right: 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    background: #3c6e8f;
    padding: 7px 16px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(60, 110, 143, 0.18);
    z-index: 1;
}

.greydot-job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.greydot-job-card-header h3 {
    margin: 0;
    font-size: 1.35rem;
    font-family: 'DM Sans', sans-serif !important;
    color: #333;
    font-weight: 700;
}

.greydot-job-type {
    font-size: 0.78rem;
    background: #dceaea;
    color: #4a6a6a;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 500;
}

.greydot-job-short-desc {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Buttons - pill-knap matcher sidens "læs mere" */
.greydot-jobs-listing .greydot-job-btn,
.greydot-job-single .greydot-job-btn,
a.greydot-job-btn,
button.greydot-job-btn {
    display: inline-block !important;
    background: transparent !important;
    color: #3c6e8f !important;
    padding: 10px 28px !important;
    border: 1.5px solid #3c6e8f !important;
    border-bottom: 1.5px solid #3c6e8f !important;
    border-radius: 30px !important;
    font-size: 0.95rem !important;
    font-family: 'DM Sans', sans-serif !important;
    font-weight: 500 !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    align-self: flex-end !important;
    margin-left: auto !important;
    box-shadow: none !important;
}

.greydot-jobs-listing .greydot-job-btn:hover,
.greydot-job-single .greydot-job-btn:hover,
a.greydot-job-btn:hover,
button.greydot-job-btn:hover {
    background: #3c6e8f !important;
    color: #fff !important;
    border-color: #3c6e8f !important;
}

/* Ansøg-knap i enkelt-visning - mere fremhævet */
.greydot-job-apply-toggle {
    margin-bottom: 24px;
    background: #3c6e8f;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    border-bottom: none;
}

.greydot-job-apply-toggle:hover {
    background: #2d5a7b;
    color: #fff !important;
}

/* Single Job View - skewed box (35px vertical offset) */
.greydot-job-skew {
    position: relative;
    padding: 75px 70px 75px;
    margin: 0 0 40px;
    background: transparent;
    box-shadow: none;
    z-index: 1;
}

.greydot-job-skew::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #ffffff;
    clip-path: polygon(0 35px, 100% 0, 100% calc(100% - 35px), 0 100%);
    z-index: -1;
    box-shadow: 0 30px 50px rgba(0,0,0,0.18);
}

.greydot-job-skew::after {
    content: "";
    position: absolute;
    left: 30px;
    right: 30px;
    top: 60px;
    bottom: -10px;
    background: rgba(20, 40, 60, 0.35);
    border-radius: 50%/40px;
    filter: blur(35px);
    z-index: -2;
}

.greydot-job-skew--form {
    margin-top: -40px;
}

.greydot-job-skew--form::before {
    background: #ffffff;
}

.greydot-job-skew--form .greydot-apply-form {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 0;
}

.greydot-job-skew-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.greydot-job-single,
.greydot-jobs-listing,
.greydot-job-single *,
.entry-content,
.et_pb_text_inner,
.et_pb_module {
    overflow: visible !important;
}

.greydot-job-skew,
.greydot-job-skew--form {
    isolation: isolate;
}

@media (max-width: 768px) {
    .greydot-job-single {
        width: 95vw;
        margin-left: calc(50% - 47.5vw);
        margin-right: calc(50% - 47.5vw);
        max-width: none;
    }
    .greydot-job-skew {
        padding: 50px 18px;
        clip-path: polygon(0 20px, 100% 0, 100% calc(100% - 20px), 0 100%);
    }
    .greydot-job-skew--form {
        padding: 50px 18px;
    }
}

/* Single Job View */
.greydot-job-back {
    display: inline-block;
    margin-bottom: 4px;
    color: #3c6e8f;
    text-decoration: none;
    font-size: 0.9rem;
}

.greydot-job-back:hover {
    text-decoration: underline;
}

.greydot-job-single-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.greydot-job-single-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-family: 'Abhaya Libre', serif;
    color: #333;
}

.greydot-job-content {
    color: #444;
    line-height: 1.7;
    margin-bottom: 32px;
    column-count: 2;
    column-gap: 50px;
    column-rule: 1px solid #e6eded;
}

.greydot-job-content > *:first-child {
    margin-top: 0;
}

/* Undgå at overskrifter brækker mellem kolonner */
.greydot-job-content h2,
.greydot-job-content h3,
.greydot-job-content h4 {
    break-after: avoid;
    page-break-after: avoid;
    margin-top: 1.4em;
}

.greydot-job-content ul,
.greydot-job-content ol,
.greydot-job-content p {
    break-inside: avoid;
    page-break-inside: avoid;
}

@media (max-width: 768px) {
    .greydot-job-content {
        column-count: 1;
    }
}

/* Application Form - matcher kontaktformularen */
.greydot-apply-form {
    background: #f4fafa;
    border: 1px solid #e0eded;
    border-radius: 20px;
    padding: 35px;
    margin-top: 24px;
}

.greydot-apply-form h3 {
    margin: 0 0 32px 0;
    font-size: 1.6rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.greydot-form-field {
    margin-bottom: 22px;
}

.greydot-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3c6e8f;
    font-family: 'DM Sans', sans-serif;
}

.greydot-form-field .required {
    color: #c0392b;
}

.greydot-form-field .greydot-optional {
    color: #999;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.78rem;
    margin-left: 4px;
}

.greydot-form-field input[type="text"],
.greydot-form-field input[type="email"],
.greydot-form-field input[type="tel"],
.greydot-form-field textarea {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1.5px solid #c8d8d8;
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    color: #1a1a1a;
}

.greydot-form-field textarea {
    border-radius: 0;
    min-height: 100px;
}

.greydot-form-field input:focus,
.greydot-form-field textarea:focus {
    outline: none;
    border-color: #3c6e8f;
    box-shadow: 0 1px 0 0 #3c6e8f;
}

/* Skjul native file input, brug custom drop-zone */
.greydot-form-file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.greydot-file-drop {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border: 1.5px dashed #c8d8d8;
    border-radius: 14px;
    background: #f8fcfc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #555;
}

.greydot-file-drop:hover {
    border-color: #3c6e8f;
    background: #eef7f7;
}

.greydot-file-drop.has-file {
    border-style: solid;
    border-color: #3c6e8f;
    background: #eef7f7;
    color: #1a1a1a;
}

.greydot-file-icon {
    font-size: 1.3rem;
}

.greydot-file-drop.has-file .greydot-file-text {
    display: none;
}

.greydot-file-name {
    font-weight: 600;
    color: #3c6e8f;
    word-break: break-all;
}

.greydot-form-success {
    text-align: center;
    padding: 30px 20px;
    font-family: 'DM Sans', sans-serif;
}

.greydot-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: #3c6e8f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 700;
}

.greydot-form-success h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
}

.greydot-form-success p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 8px;
}

.greydot-form-success .greydot-success-sub {
    color: #888;
    font-size: 0.9rem;
    margin-top: 8px;
}

.greydot-form-field input[type="file"] {
    font-size: 0.9rem;
}

.greydot-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #718096;
}

.greydot-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.greydot-form-submit {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.greydot-form-submit .greydot-job-btn {
    background: transparent;
    color: #333 !important;
    padding: 10px 24px;
    border: 1px solid #333;
    border-radius: 30px;
    font-size: 0.95rem;
}

.greydot-form-submit .greydot-job-btn:hover {
    background: #3c6e8f;
    color: #fff !important;
    border-color: #3c6e8f;
}

.greydot-form-status {
    font-size: 0.95rem;
}

.greydot-form-status.success {
    color: #27ae60;
}

.greydot-form-status.error {
    color: #c0392b;
}

.greydot-form-status.loading {
    color: #718096;
}

/* Responsive - Tablet */
@media (max-width: 980px) {
    .greydot-jobs-listing {
        gap: 20px;
    }

    .greydot-job-card {
        padding: 28px 24px;
    }

}

/* Responsive - Mobil */
@media (max-width: 768px) {
    .greydot-jobs-listing {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 16px;
    }

    .greydot-job-card {
        padding: 24px 20px;
    }

    .greydot-job-card-header h3 {
        font-size: 1.15rem;
    }

    .greydot-job-single-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .greydot-job-single-header h2 {
        font-size: 1.4rem;
    }

    .greydot-form-row {
        grid-template-columns: 1fr;
    }

    .greydot-apply-form {
        padding: 24px 20px;
    }

    .greydot-form-submit {
        flex-direction: column;
        align-items: flex-start;
    }
}
