/**
 * Deecke Careers - Frontend Styles
 *
 * Primary Color: #00AFE0
 * Fonts: Inherit from Elementor/Theme
 */

/* ==========================================================================
   Careers List Widget
   ========================================================================== */

.deecke-careers-list {
    width: 100%;
}

.deecke-company-group {
    margin-bottom: 40px;
}

.deecke-company-group:last-child {
    margin-bottom: 0;
}

.deecke-company-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.deecke-logo-above .deecke-company-header {
    flex-direction: column;
    align-items: flex-start;
}

.deecke-company-logo {
    width: 60px;
    height: auto;
    object-fit: contain;
}

.deecke-company-name {
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    color: #1a1a2e;
}

.deecke-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deecke-job-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.deecke-job-item:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.deecke-job-info {
    flex: 1;
}

.deecke-job-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: 600;
    color: #1a1a2e;
}

.deecke-job-meta {
    font-size: 0.875em;
    color: #6c757d;
}

.deecke-job-arrow {
    font-size: 1.25em;
    color: #00AFE0;
    transition: transform 0.2s ease;
}

.deecke-job-item:hover .deecke-job-arrow {
    transform: translateX(5px);
}

.deecke-no-positions {
    cursor: default;
}

.deecke-no-positions:hover {
    transform: none;
}

.deecke-no-positions-text {
    color: #6c757d;
    font-style: italic;
}

/* ==========================================================================
   Single Job Widget
   ========================================================================== */

.deecke-single-job {
    max-width: 800px;
}

.deecke-back-btn {
    display: inline-block;
    margin-bottom: 20px;
    color: #00AFE0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.deecke-back-btn:hover {
    color: #0095c7;
}

.deecke-job-header {
    margin-bottom: 30px;
}

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

.deecke-job-company-logo img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.deecke-single-job .deecke-job-title {
    margin: 0 0 15px 0;
    font-size: 2em;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.deecke-single-job .deecke-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.deecke-job-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.95em;
}

.deecke-job-meta-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.deecke-job-meta-icon svg {
    width: 20px;
    height: 20px;
}

.deecke-job-description {
    margin-bottom: 40px;
    line-height: 1.7;
    color: #333;
}

.deecke-job-description h2,
.deecke-job-description h3,
.deecke-job-description h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1a1a2e;
}

.deecke-job-description ul,
.deecke-job-description ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

.deecke-job-description li {
    margin-bottom: 0.5em;
}

.deecke-job-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.deecke-apply-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #00AFE0;
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.deecke-apply-btn:hover {
    background-color: #0095c7;
    color: #fff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Application Form Widget
   ========================================================================== */

.deecke-application-form-wrapper {
    width: 100%;
    max-width: 100%;
}

.deecke-form-job-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.deecke-form-job-title {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #1a1a2e;
}

.deecke-form-company-logo {
    margin-bottom: 15px;
}

.deecke-form-company-logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.deecke-form-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #6c757d;
}

.deecke-form-job-meta .deecke-form-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.deecke-form-job-meta svg {
    flex-shrink: 0;
}

.deecke-form-intro {
    margin-bottom: 30px;
}

.deecke-form-intro-title {
    margin: 0 0 10px 0;
    font-size: 1.25em;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
}

.deecke-form-intro-text {
    margin: 0;
    color: #6c757d;
    font-size: 1em;
    line-height: 1.6;
}

.deecke-application-form {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.deecke-form-row {
    margin-bottom: 20px;
}

.deecke-form-row:last-child {
    margin-bottom: 0;
}

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

/* Handled in main responsive section below */

.deecke-form-field {
    display: flex;
    flex-direction: column;
}

.deecke-form-label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
}

.deecke-form-label .required {
    color: #dc3545;
}

.deecke-file-hint {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.85em;
    margin-left: 5px;
}

.deecke-form-input,
.deecke-form-textarea {
    padding: 12px 15px;
    font-size: 1em;
    font-family: inherit;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.deecke-form-input:focus,
.deecke-form-textarea:focus {
    border-color: #00AFE0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 175, 224, 0.1);
}

.deecke-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* File Upload - Drag & Drop Style */
.deecke-file-upload-wrapper {
    position: relative;
}

.deecke-form-file {
    width: 100%;
    min-height: 120px;
    padding: 30px 20px;
    font-size: 0.9em;
    font-family: inherit;
    background-color: #fafafa;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    text-align: center;
}

.deecke-form-file:hover {
    border-color: #00AFE0;
    background-color: #f0f9fc;
}

.deecke-form-file:focus {
    outline: none;
    border-color: #00AFE0;
}

.deecke-form-file::file-selector-button {
    display: none;
}

/* Custom file upload text styling */
.deecke-file-upload-text {
    display: block;
    padding: 25px 15px;
    background-color: #fafafa;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deecke-file-upload-text:hover {
    border-color: #00AFE0;
    background-color: #f0f9fc;
}

.deecke-file-upload-text .deecke-upload-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
    color: #999;
}

.deecke-file-upload-text .deecke-upload-main {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.deecke-file-upload-text .deecke-upload-hint {
    display: block;
    color: #888;
    font-size: 0.85em;
}

.deecke-file-selected {
    color: #00AFE0 !important;
    border-color: #00AFE0 !important;
}

/* Documents Section */
.deecke-form-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.deecke-form-section-title {
    margin: 0 0 5px 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

.deecke-form-section-desc {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 0.9em;
}

/* Drop Zone */
.deecke-file-drop-zone {
    position: relative;
    min-height: 120px;
    padding: 25px 15px;
    background-color: #fafafa;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deecke-file-drop-zone:hover {
    border-color: #00AFE0;
    background-color: #f0f9fc;
}

.deecke-file-drop-zone.dragover {
    border-color: #00AFE0;
    background-color: #e6f7fc;
}

.deecke-file-drop-zone.has-file {
    border-color: #00AFE0;
    background-color: #f0f9fc;
}

.deecke-file-drop-zone.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.deecke-form-file-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.deecke-drop-content {
    pointer-events: none;
}

.deecke-drop-text {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.deecke-drop-hint {
    display: block;
    color: #888;
    font-size: 0.85em;
}

.deecke-drop-filename {
    display: block;
    color: #00AFE0;
    font-weight: 500;
    margin-top: 10px;
}

/* Form Actions */
.deecke-form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.deecke-form-submit {
    margin-top: 30px;
    text-align: center;
}

.deecke-submit-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #00AFE0;
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.deecke-submit-btn:hover {
    background-color: #0095c7;
}

.deecke-btn-arrow {
    margin-left: 10px;
}

/* Cancel Button */
.deecke-cancel-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #6c757d;
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.deecke-cancel-btn:hover {
    background-color: #5a6268;
    color: #fff;
}

.deecke-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.deecke-submit-btn.loading {
    position: relative;
    color: transparent;
}

.deecke-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: deecke-spinner 0.8s linear infinite;
}

@keyframes deecke-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Form Messages */
.deecke-form-messages {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    text-align: center;
}

.deecke-form-messages.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.deecke-form-messages.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Job Closed Message */
.deecke-job-closed {
    padding: 30px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
}

/* ==========================================================================
   Templates (Non-Elementor)
   ========================================================================== */

.deecke-page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.deecke-page-wrapper .deecke-single-job,
.deecke-page-wrapper .deecke-application-form-wrapper {
    max-width: 100%;
    width: 100%;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* iPad / Tablet */
@media (max-width: 1024px) {
    .deecke-form-row-2 {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .deecke-form-job-title {
        font-size: 1.3em;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .deecke-single-job .deecke-job-title {
        font-size: 1.5em;
    }

    .deecke-single-job .deecke-job-meta {
        flex-direction: column;
        gap: 10px;
    }

    .deecke-form-row-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .deecke-apply-btn,
    .deecke-submit-btn,
    .deecke-cancel-btn {
        width: 100%;
        text-align: center;
    }

    .deecke-form-actions {
        flex-direction: column;
    }

    .deecke-form-job-title {
        font-size: 1.2em;
    }

    .deecke-form-intro-title {
        font-size: 1.1em;
    }

    .deecke-job-company-logo img,
    .deecke-form-company-logo img {
        max-height: 45px;
    }

    .deecke-file-drop-zone {
        min-height: 100px;
        padding: 20px 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .deecke-form-input,
    .deecke-form-textarea {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .deecke-submit-btn,
    .deecke-cancel-btn {
        padding: 12px 20px;
    }
}
