/* Login notice */
.login-notice {
    background: #f0f4f8;
    border-left: 4px solid #2271b1;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
}

.login-button {
    display: inline-block;
    background: #2271b1;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: background 0.3s;
}

.login-button:hover {
    background: #135e96;
    color: white;
}

/* Meddelanden */
.notice {
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid;
    border-radius: 4px;
}

.notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Wrappers */
.job-submission-wrapper,
.company-profile-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Formulär container */
.job-form-container,
.profile-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.job-form-container h2,
.profile-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Form sections */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

/* Form rows */
.form-row {
    margin-bottom: 20px;
}

.form-row-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row-two-cols {
        grid-template-columns: 1fr;
    }
}

/* Form fields */
.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.form-field input.error,
.form-field textarea.error,
.form-field select.error {
    border-color: #dc3545;
}

.field-description {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.form-help-text {
    margin-top: 15px;
    color: #666;
    font-size: 13px;
}

/* Knappar */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.button-primary {
    background: #2271b1;
    color: white;
}

.button-primary:hover {
    background: #135e96;
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
}

.button-secondary:hover {
    background: #e0e0e0;
}

/* Edit notice */
.edit-notice {
    background: #fff3cd;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.cancel-edit {
    color: #721c24;
    text-decoration: underline;
    margin-left: 10px;
}

/* Company page link notice */
.company-page-link-notice {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    border-left: 4px solid #2271b1;
}

.company-page-link-notice p {
    margin: 0;
    font-size: 14px;
}

.company-page-link-notice a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.company-page-link-notice a:hover {
    text-decoration: underline;
}

/* Jobblista */
.user-jobs-list {
    margin-top: 40px;
}

.user-jobs-list h3 {
    margin-bottom: 20px;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.jobs-table thead {
    background: #f8f9fa;
}

.jobs-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.jobs-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.jobs-table tbody tr:hover {
    background: #f8f9fa;
}

.jobs-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-draft {
    background: #e0e0e0;
    color: #666;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

/* Action links */
.action-link {
    color: #2271b1;
    text-decoration: none;
    margin-right: 15px;
    font-weight: 500;
}

.action-link:hover {
    text-decoration: underline;
}

.action-link.delete-link {
    color: #dc3545;
}

.action-link.delete-link:hover {
    color: #a02622;
}

/* Logotyp field */
.current-logo {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.current-logo img {
    display: block;
    margin: 0 auto;
}

/* Image field */
.current-image {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.current-image img {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Character counter */
.char-counter {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.char-counter.over-limit {
    color: #dc3545;
    font-weight: 600;
}

/* Responsiv */
@media (max-width: 768px) {
    .job-submission-wrapper,
    .company-profile-wrapper {
        padding: 10px;
    }
    
    .job-form-container,
    .profile-form-container {
        padding: 20px;
    }
    
    .jobs-table {
        font-size: 14px;
    }
    
    .jobs-table th,
    .jobs-table td {
        padding: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
        text-align: center;
    }
    
    /* Dölj vissa kolumner på mobil */
    .jobs-table .job-date-col {
        display: none;
    }
}

@media (max-width: 480px) {
    .jobs-table thead {
        display: none;
    }
    
    .jobs-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .jobs-table td {
        display: block;
        text-align: right;
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .jobs-table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
    }
    
    .jobs-table td:last-child {
        border-bottom: none;
    }
}
/* Two-column layout */
.job-form-and-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

@media (max-width: 1024px) {
    .job-form-and-preview {
        grid-template-columns: 1fr;
    }
}

/* Form styling */
.job-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.job-form-container h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 28px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.form-field input[type="text"],
.form-field input[type="url"],
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

/* Category radio buttons */
.job-category-list {
    margin-top: 10px;
}

.category-radio {
    display: block;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.category-radio:hover {
    background: #f5f5f5;
    border-color: #2271b1;
}

.category-radio input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.category-radio.subcategory {
    margin-left: 20px;
    background: #f9f9f9;
}

.no-categories {
    color: #dc3545;
    font-weight: 500;
}

.char-count {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    text-align: right;
}

/* Preview styling */
.job-preview-container {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.job-preview-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 1px;
}

.job-preview-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 20px 25px 25px 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

.preview-category {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #9E1A7D !important;
    color: #ffffff !important;
    padding: 10px 15px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-date {
    font-size: 13px;
    color: #666;
    margin-top: 35px;
    margin-bottom: 10px;
}

.preview-title {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 35px 0 15px 0 !important;
    line-height: 1.3 !important;
}

.preview-title::first-letter {
    text-transform: uppercase !important;
}

.preview-description {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.preview-meta {
    margin: 20px 0;
}

.preview-meta-row {
    margin-bottom: 6px;
    line-height: 1.6;
    font-size: 16px;
}

.preview-meta-row strong {
    font-weight: 700;
    color: #000;
}

.preview-meta-row span {
    color: #333;
    margin-left: 5px;
}

.preview-read-more {
    display: inline-block;
    background: transparent;
    color: #8B1874;
    padding: 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    transition: color 0.3s;
}

.preview-read-more:hover {
    color: #6d1159;
}

/* Author page styling */
.author-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ta bort wrapper padding i mobil/tablet för fullbredd jobb */
@media (max-width: 1024px) {
    .author-page-wrapper {
        padding: 0;
    }
    
    /* Lägg tillbaka padding på header och andra element */
    .author-header {
        padding: 0 20px;
    }
}

/* Lägg till luft när företagsbild saknas */
.author-page-wrapper.no-hero-image .author-header {
    padding-top: 40px;
}

.company-hero-image {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    margin-bottom: 40px;
}

/* Fullbredd hero-bild i mobil/tablet */
@media (max-width: 1024px) {
    .company-hero-image {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
}

.company-hero-image img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
}

.author-header {
    margin-bottom: 60px;
}

.company-name {
    font-size: 42px;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
}

/* Mindre fontstorlek i mobil */
@media (max-width: 768px) {
    .company-name {
        font-size: 29px !important;
    }
}

/* Mindre fontstorlek i tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .company-name {
        font-size: 36px !important;
    }
}

.company-intro {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.6;
    margin-bottom: 30px;
}

.company-presentation {
    margin-bottom: 30px;
}

.company-presentation h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px 0;
}

.company-presentation p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

.company-media-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 30px;
}

/* Kolumn-layout i mobil/tablet */
@media (max-width: 1024px) {
    .company-media-row {
        flex-direction: column;
        gap: 30px;
    }
}

.company-video {
    flex: 1;
    max-width: 560px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Ta bort absolute positioning i mobil/tablet */
@media (max-width: 1024px) {
    .video-wrapper iframe {
        position: static;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
}

.company-logo-section {
    flex-shrink: 0;
}

.company-logo {
    margin-bottom: 20px;
}

.company-logo img {
    max-width: 300px;
    height: auto;
    display: block;
}

.company-website-button .website-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #8B1874;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.3s;
}

.company-website-button .website-btn:hover {
    background: #6d1159;
}

.company-website-button .btn-icon {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.company-website {
    margin-bottom: 20px;
}

.jobs-section {
    padding: 0 0 40px 0;
    margin-top: 60px;
}

/* Padding på jobs-section-title */
.jobs-section-title {
    padding: 0 20px;
}

/* Ta bort padding i mobil/tablet för fullbredd jobb */
@media (max-width: 1024px) {
    .jobs-section {
        padding: 0 0 40px 0;
    }
    
    .jobs-section-title {
        padding: 0 20px;
    }
}

.jobs-section-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 30px 0;
}

/* Mindre fontstorlek i mobil */
@media (max-width: 768px) {
    .jobs-section-title {
        font-size: 25px !important;
    }
}

/* Author page jobs grid - ingen padding i desktop, wrapper har det */
.author-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Padding på jobs-grid i mobil/tablet */
@media (max-width: 1024px) {
    .author-jobs-grid {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .author-jobs-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

.job-card {
    position: relative;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 50px 25px 20px 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.job-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.job-category-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #9E1A7D;
    color: #ffffff;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.job-card-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #000;
    margin: 15px 0 15px 0;
    line-height: 1.3;
    text-transform: none !important;
}

.job-card-title::first-letter {
    text-transform: uppercase;
}

.job-card-title a {
    text-transform: none !important;
}

/* Custom jobb-titel styling (från theme) */
.custom-jobb-title {
    font-family: 'Open Sans', sans-serif !important;
    color: #000;
    font-weight: bold;
    line-height: 1.3;
    margin: 0 0 15px 0;
    text-transform: none !important; /* Överskrid Elementors global style */
}

.custom-jobb-title a {
    color: #000 !important;
    text-decoration: none !important;
    font-size: 21px !important;
    line-height: 1.3em !important;
    transition: color 0.3s ease;
    display: block;
    text-transform: none !important; /* Överskrid Elementors global style */
}

.custom-jobb-title a::first-letter {
    text-transform: uppercase !important;
}

.custom-jobb-title a:hover {
    color: #9E1A7D !important;
}

/* Badge styling (från theme) */
.elementor-widget-posts .jobb-kategori-badge {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #9E1A7D !important;
    color: #ffffff !important;
    padding: 10px 15px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Elementor Posts widget anpassningar */
.elementor-widget-posts .jobb-meta-info {
    padding-top: 5px;
}

.elementor-widget-posts .jobb-meta-info p {
    padding: 3px 0;
}

.elementor-widget-posts article.elementor-post {
    position: relative !important;
}

.elementor-widget-posts article.elementor-post .elementor-post__text {
    padding-top: 35px;
}

/* Läs mer-knapp */
.jobb-las-mer-knapp {
    text-align: right;
    display: inline-block;
    color: #9E1A7D !important;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none !important;
    margin-top: 15px;
}

.job-card-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.job-card-title a:hover {
    color: #8B1874;
}

.job-card-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.job-card-meta {
    margin: 0;
}

.job-meta-row {
    margin-bottom: 6px;
    line-height: 1.6;
    font-size: 16px;
}

.job-meta-row strong {
    font-weight: 700;
    color: #000;
}

.job-meta-row span {
    color: #333;
    margin-left: 5px;
}

.job-meta-row .company-link {
    color: #8B1874;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.job-meta-row .company-link:hover {
    color: #6d1159;
    text-decoration: underline;
}

.job-read-more {
    display: inline-block;
    background: transparent;
    color: #8B1874;
    padding: 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    margin-top: 0;
    transition: color 0.3s;
}

.job-read-more:hover {
    color: #6d1159;
}

.no-jobs {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Login page styling */
.login-page-wrapper {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 20px;
}

.login-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-container h1 {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 30px 0;
    text-align: center;
}

.login-error {
    background: #ffebee;
    border-left: 4px solid #dc3545;
    color: #dc3545;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-weight: 500;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.login-field input[type="text"],
.login-field input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.login-remember {
    margin-bottom: 20px;
}

.login-remember label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.login-submit {
    margin-bottom: 20px;
}

.login-submit .button-primary {
    width: 100%;
    padding: 14px;
    background: #8B1874;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.login-submit .button-primary:hover {
    background: #6d1159;
}

.login-links {
    text-align: center;
    margin: 0;
}

.login-links a {
    color: #8B1874;
    text-decoration: none;
    font-weight: 600;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Image actions */
.image-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.image-actions .button-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.image-actions .button-secondary:hover {
    background: #e0e0e0;
}

.delete-image-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc3545;
    font-weight: 600;
    cursor: pointer;
}

.delete-image-checkbox input[type="checkbox"] {
    cursor: pointer;
}

/* Empty state styling */
.preview-meta-item span:empty::before {
    content: "-";
    color: #ccc;
}

#preview-title:empty::before {
    content: "Rubrik på annons";
    color: #ccc;
}
