/**
 * Job Ad Creator Styles - Updated to match Recrur brand
 * Aligned with GeneratePress and existing plugin styling
 */

/* Common styles */
.job-ad-creator-admin,
.job-ad-creator-result {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* AI Instruction styling */
.jac-ai-instruction {
    background-color: #f7f8f9;
    border-left: 4px solid #44D2EB;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-style: italic;
    color: #242424;
    border-radius: 4px;
    font-weight: 500;
}

/* Section styles - Updated with brand corners and colors */
.jac-section {
    margin-bottom: 30px;
    padding: 25px;
    background-color: #ffffff;
    border: 1px solid #f2f5f7;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 1px 3px rgba(17, 23, 87, 0.05);
    transition: all 0.3s ease;
}

.jac-section:hover {
    border-color: #44D2EB;
    box-shadow: 0 2px 8px rgba(68, 210, 235, 0.15);
}

.jac-section h3 {
    margin: 0 0 20px 0;
    color: #111757;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #111757;
}

/* Instruction text styling */
.jac-instruction {
    color: #242424;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Field row styles */
.jac-field-row,
.jac-setting-row {
    margin-bottom: 20px;
}

.jac-field-row label,
.jac-setting-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #242424;
    font-size: 14px;
}

.jac-field-row input,
.jac-field-row textarea,
.jac-setting-row select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #f2f5f7;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f7f8f9;
    color: #242424;
    transition: all 0.3s ease;
}

.jac-field-row input:focus,
.jac-field-row textarea:focus,
.jac-setting-row select:focus {
    outline: 2px solid #44D2EB;
    outline-offset: 2px;
    border-color: #44D2EB;
    background-color: #ffffff;
}

/* Fixed fields styling - Updated colors */
.jac-fixed-field label {
    color: #111757;
}

.jac-fixed-field input {
    background-color: #f7f8f9;
    border-color: #f2f5f7;
}

.jac-fixed-field input:focus {
    background-color: #ffffff;
    border-color: #111757;
    outline: 2px solid #111757;
}

/* Flexible fields styling - Updated colors */
.jac-flexible-field label {
    color: #111757;
}

.jac-flexible-field textarea {
    background-color: #f7f8f9;
    border-color: #f2f5f7;
    min-height: 100px;
    resize: vertical;
}

.jac-flexible-field textarea:focus {
    background-color: #ffffff;
    border-color: #44D2EB;
}

/* AI Instruction field - Enhanced styling */
.jac-ai-instruction-field {
    background-color: #f7f8f9 !important;
    border-left: 4px solid #44D2EB !important;
    border-color: #44D2EB !important;
    box-shadow: 0 2px 8px rgba(68, 210, 235, 0.15) !important;
}

/* Button styling - Updated to match brand */
.jac-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background-color: #111757;
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
    min-width: 180px;
}

.jac-button:hover {
    background-color: #44D2EB;
    color: #121212;
    transform: translateY(-2px);
}

.jac-button:focus {
    outline: 2px solid #44D2EB;
    outline-offset: 2px;
}

.jac-button:disabled {
    background-color: #242424;
    cursor: not-allowed;
    transform: none;
}

/* Spinner styling */
.jac-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: jac-spin 1s linear infinite;
}

@keyframes jac-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Submit section styling */
.jac-submit-section {
    text-align: center;
    border-top: 1px solid #f2f5f7;
    padding-top: 20px !important;
    background: #f7f8f9 !important;
}

/* Result container - Updated styling */
#jac-result-container {
    padding: 25px;
    background-color: #ffffff;
    border: 1px solid #f2f5f7;
    border-top-left-radius: 30px;
    border-bottom-right-radius: 30px;
    min-height: 200px;
    box-shadow: 0 1px 3px rgba(17, 23, 87, 0.05);
}

.jac-result-placeholder {
    text-align: center;
    color: #242424;
    padding: 60px 20px;
    font-style: italic;
    border: 2px dashed #f2f5f7;
    background: #f7f8f9;
    border-radius: 8px;
}

/* Result content styling */
.jac-result-job-ad {
    line-height: 1.6;
    color: #242424;
}

.jac-result-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #111757;
}

.jac-result-job-title {
    margin: 0 0 10px 0;
    color: #111757;
    font-size: 28px;
    font-weight: 600;
}

.jac-result-subheader {
    margin-bottom: 10px;
    font-size: 16px;
    color: #242424;
    font-weight: 500;
}

.jac-result-company {
    color: #111757;
    font-weight: 600;
}

.jac-result-location {
    color: #242424;
}

.jac-result-website {
    margin-top: 10px;
}

.jac-result-website a {
    color: #111757;
    text-decoration: underline;
    font-weight: 500;
}

.jac-result-website a:hover {
    color: #44D2EB;
}

/* Result content sections */
.jac-result-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f7f8f9;
    border: 1px solid #f2f5f7;
    border-radius: 8px;
}

.jac-result-section:last-child {
    margin-bottom: 0;
}

.jac-result-section h4 {
    margin: 0 0 15px 0;
    color: #111757;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f5f7;
}

.jac-result-content {
    line-height: 1.6;
    color: #242424;
    white-space: pre-line;
    word-wrap: break-word;
}

/* Error container - Updated styling */
#jac-error-container {
    margin-top: 20px;
    padding: 15px 20px;
    background-color: #fdf2f2;
    border-left: 4px solid #b41a04;
    color: #b41a04;
    border-radius: 4px;
    font-weight: 500;
}

.jac-error-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Status messages */
.jac-status-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-weight: 500;
    border-radius: 4px;
}

.jac-status-message.success {
    background: #f7f8f9;
    border-color: #111757;
    color: #111757;
}

.jac-status-message.error {
    background: #fdf2f2;
    border-color: #b41a04;
    color: #b41a04;
}

/* Additional instructions section styling */
.jac-additional-instructions-section textarea {
    background-color: #f7f8f9;
    border: 1px solid #f2f5f7;
    min-height: 80px;
}

.jac-additional-instructions-section textarea:focus {
    background-color: #ffffff;
    border-color: #44D2EB;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .job-ad-creator-admin,
    .job-ad-creator-result {
        padding: 15px;
    }
    
    .jac-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .jac-section h3 {
        font-size: 18px;
    }
    
    .jac-button {
        width: 100%;
        min-width: auto;
        padding: 15px 20px;
    }
    
    #jac-result-container {
        padding: 20px;
    }
    
    .jac-result-job-title {
        font-size: 24px;
    }
    
    .jac-result-section {
        padding: 15px;
    }
    
    .jac-result-section h4 {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .job-ad-creator-admin,
    .job-ad-creator-result {
        padding: 10px;
    }
    
    .jac-section {
        padding: 15px;
        border-radius: 15px;
    }
    
    .jac-section h3 {
        font-size: 16px;
    }
    
    .jac-field-row input,
    .jac-field-row textarea,
    .jac-setting-row select {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    #jac-result-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .jac-result-job-title {
        font-size: 20px;
    }
    
    .jac-result-section {
        padding: 12px;
    }
}

/* Enhanced animations and interactions */
.jac-section,
.jac-button,
.jac-field-row input,
.jac-field-row textarea,
.jac-setting-row select {
    transition: all 0.3s ease;
}

/* Hover effects for better user experience */
.jac-field-row input:hover,
.jac-field-row textarea:hover,
.jac-setting-row select:hover {
    border-color: #44D2EB;
    box-shadow: 0 1px 3px rgba(68, 210, 235, 0.1);
}

/* Loading state improvements */
.jac-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Success state for completed enhancement */
.jac-result-container.enhanced {
    border-color: #111757;
    box-shadow: 0 2px 8px rgba(17, 23, 87, 0.15);
}