/*
 Theme Name:   Hello Elementor Child
 Description:  A child theme for Hello Elementor
 Template:     hello-elementor
 Version:      1.0.0
*/

/* --- Employee Restrictions --- */
/* Hide employer-only buttons when logged in as employee */
.pliromatas-is-employee a.elementor-button[href*="job-offer-form"] {
    display: none !important;
}

/* --- USP Pro Form Styling --- */

/* 1. Main Form Container */
.usp-form {
    max-width: 100%;
    /* Let Elementor control the width */
    margin: 0;
    font-family: inherit;
    /* Inherit font from your theme */
}

/* 2. Field Wrappers (The divs holding label + input) */
/* USP Pro usually wraps fields in divs or paragraphs */
.usp-form .usp-input,
.usp-form .usp-textarea,
.usp-form .usp-select,
.usp-form .usp-checkboxes {
    margin-bottom: 20px;
    /* Space between fields */
    display: block;
}

/* 3. Labels */
.usp-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    /* Dark grey text */
    font-size: 15px;
}

/* 4. Inputs & Textareas */
.usp-form input[type="text"],
.usp-form input[type="email"],
.usp-form input[type="url"],
.usp-form input[type="tel"],
.usp-form textarea,
.usp-form select {
    width: 100%;
    /* Full width of the container */
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    /* Slight rounded corners */
    background-color: #fff;
    font-size: 16px;
    /* Prevents zooming on iPhone */
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    /* Ensures padding doesn't break layout */
}

/* Focus State (When user clicks inside) */
.usp-form input:focus,
.usp-form textarea:focus,
.usp-form select:focus {
    border-color: #0073e6;
    /* Change this to your brand color */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1);
    /* Subtle glow */
}

/* 5. Textarea specific resizing */
.usp-form textarea {
    min-height: 120px;
    resize: vertical;
    /* Allow vertical resizing only */
}

/* 6. Checkboxes & Radios (Optional if you use them) */
.usp-form input[type="checkbox"],
.usp-form input[type="radio"] {
    width: auto;
    margin-right: 10px;
    display: inline-block;
}

/* 7. The Submit Button */
/* Targeting specifically the submit button inside USP forms */
.usp-form .usp-submit,
.usp-form input[type="submit"] {
    background-color: #0073e6;
    /* Brand Blue - Change to match your site */
    color: #ffffff;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-block;
    width: auto;
    /* Or set to 100% for full width button */
    margin-top: 10px;
}

/* Hover effect for button */
.usp-form .usp-submit:hover,
.usp-form input[type="submit"]:hover {
    background-color: #005bb5;
    /* Darker shade for hover */
}

/* 8. Error/Success Messages (USP Pro injects these) */
.usp-error,
.usp-success {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

.usp-error {
    background-color: #fde8e8;
    color: #c81e1e;
    border: 1px solid #f8b4b4;
}

.usp-success {
    background-color: #def7ec;
    color: #03543f;
    border: 1px solid #84e1bc;
}

/* =============================================================================
   PLIROMATAS SINGLE POST TEMPLATE STYLES
   ============================================================================= */

/* Container */
.pliromatas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Post Header */
.pliromatas-post-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 0;
}

.pliromatas-post-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.3;
}

.pliromatas-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.pliromatas-post-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Content Wrapper */
.pliromatas-post-content-wrapper {
    background: #f8f9fa;
    padding: 40px 0;
    min-height: 60vh;
}

/* Blog posts get a white background */
.pliromatas-post-content-wrapper.is-blog-post {
    background: white;
}

/* Job Listing Layout - Two Columns */
.pliromatas-job-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

/* Left Column - Main Content */
.pliromatas-job-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Info Card */
.pliromatas-info-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.pliromatas-info-card h3 {
    margin: 0 0 20px;
    font-size: 1.1rem;
    color: #1e3a5f;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
    margin-right: 20px;
}

.info-value {
    color: #1e3a5f;
    text-align: right;
}

/* Post Content - Base Styles */
.pliromatas-post-content {
    line-height: 1.7;
}

.pliromatas-post-content p {
    margin-bottom: 1em;
}

/* Job Listing Content - Card Style */
.is-job-listing .pliromatas-post-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Blog Post Content - Full Width Clean Style */
.is-blog-post .pliromatas-post-content {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

/* Right Column - Sidebar */
.pliromatas-job-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

.pliromatas-sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.pliromatas-sidebar-card h4 {
    margin: 0 0 15px;
    font-size: 1rem;
    color: #1e3a5f;
}

.sidebar-note {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.pliromatas-login-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.pliromatas-login-btn:hover {
    background: #005a87;
    color: white;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    display: block;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.share-btn.email {
    background: #555;
    color: white;
}

/* Blog Post Layout */
.pliromatas-blog-post {
    width: 100%;
}

.pliromatas-post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 900px) {
    .pliromatas-job-layout {
        grid-template-columns: 1fr;
    }

    .pliromatas-job-sidebar {
        position: static;
    }

    .pliromatas-post-title {
        font-size: 1.6rem;
    }

    .info-row {
        flex-direction: column;
        gap: 5px;
    }

    .info-value {
        text-align: left;
    }

    .share-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .share-btn {
        flex: 1;
        min-width: 100px;
    }
}

/* ===========================================
   Naval Base (Εργαζόμενοι Βάσης) Styles
   =========================================== */

/* Green gradient header for naval base posts */
.is-naval-base .pliromatas-post-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

/* Green accent for naval base info card header */
.is-naval-base .pliromatas-info-card h3 {
    color: #1b5e20;
}

/* Green accent for naval base sidebar titles */
.is-naval-base .pliromatas-sidebar-card h4 {
    color: #1b5e20;
}

/* Green login button for naval base posts */
.is-naval-base .pliromatas-login-btn {
    background: #28a745;
}

.is-naval-base .pliromatas-login-btn:hover {
    background: #1e7e34;
}

/* ===========================================
   Profile Customization Styles
   =========================================== */

/* Profile Type Badge */
.pliromatas-profile-badge {
    display: block;
    width: fit-content;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.3px;
    margin: auto;
}

.pliromatas-badge-crew {
    background: #e8f4fc;
    color: #0073aa;
    border: 1px solid #b8dff5;
}

.pliromatas-badge-naval-base {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.pliromatas-badge-employer {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* Profile Section Container */
.pliromatas-profile-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
}

/* Edit Button */
.pliromatas-edit-profile-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.pliromatas-edit-profile-btn:hover {
    background: #005a87;
    color: #fff !important;
}

.pliromatas-edit-profile-btn.naval {
    background: #28a745;
}

.pliromatas-edit-profile-btn.naval:hover {
    background: #1e7e34;
}

/* Field Display */
.pliromatas-profile-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pliromatas-field-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pliromatas-field-row:last-child {
    border-bottom: none;
}

.pliromatas-field-row.pliromatas-field-full {
    flex-direction: column;
    gap: 8px;
}

.pliromatas-field-label {
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
    margin-right: 20px;
    font-size: 14px;
}

.pliromatas-field-value {
    color: #1e3a5f;
    text-align: right;
    font-size: 14px;
}

.pliromatas-field-full .pliromatas-field-value {
    text-align: left;
}

/* Certificate Tags */
.pliromatas-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.pliromatas-cert-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f4fc;
    color: #0073aa;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #b8dff5;
}

.naval-base-profile .pliromatas-cert-tag {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #a5d6a7;
}

/* CV Link */
.pliromatas-cv-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #f4f6f7;
    color: #333 !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e1e4e8;
    transition: background 0.2s;
}

.pliromatas-cv-link:hover {
    background: #e9ecef;
}

/* Empty Profile Message */
.pliromatas-empty-profile {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

/* Edit Form */
.pliromatas-edit-form h3 {
    margin: 0 0 25px;
    color: #1e3a5f;
    font-size: 1.2rem;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.pliromatas-edit-form.naval h3 {
    color: #1b5e20;
}

.pliromatas-form-group {
    margin-bottom: 20px;
}

.pliromatas-form-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}

.pliromatas-form-group input[type="text"],
.pliromatas-form-group textarea,
.pliromatas-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.pliromatas-form-group input:focus,
.pliromatas-form-group textarea:focus,
.pliromatas-form-group select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.pliromatas-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.pliromatas-form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

/* Checkbox Grid */
.pliromatas-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    background: #fafafa;
}

.pliromatas-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    font-size: 13px !important;
    color: #444 !important;
    cursor: pointer;
    padding: 4px 0;
}

.pliromatas-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

/* Current CV & Remove */
.pliromatas-current-cv {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f4f6f7;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}

.pliromatas-remove-cv {
    margin-left: auto;
    font-weight: 400 !important;
    font-size: 12px !important;
    color: #dc3545 !important;
    cursor: pointer;
}

/* Form Actions */
.pliromatas-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.pliromatas-save-btn {
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pliromatas-save-btn:hover {
    background: #005a87;
}

.pliromatas-save-btn.naval {
    background: #28a745;
}

.pliromatas-save-btn.naval:hover {
    background: #1e7e34;
}

.pliromatas-cancel-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: #f4f6f7;
    color: #555 !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e1e4e8;
    transition: background 0.2s;
}

.pliromatas-cancel-btn:hover {
    background: #e9ecef;
}

/* Profile Responsive */
@media (max-width: 600px) {
    .pliromatas-field-row {
        flex-direction: column;
        gap: 4px;
    }
    .pliromatas-field-row .pliromatas-field-value {
        text-align: left;
    }
    .pliromatas-tags {
        justify-content: flex-start;
    }
    .pliromatas-form-actions {
        flex-direction: column;
    }
    .pliromatas-current-cv {
        flex-direction: column;
        align-items: flex-start;
    }
}