/**
 * JD Creator - Modern Multi-Step Form Styles
 */

/* Global Wrapper */
.jd-creator-wrapper {
   
    margin: 40px auto;
    padding: 20px;
    font-family: 'Nunito Sans';
}

.jd-creator-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 50px;
    position: relative;
}

/* Header */
.jd-creator-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
   
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jd-creator-subtitle {
    font-size: 16px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Progress Steps */
.jd-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.jd-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.jd-step.active .step-number,
.jd-step.completed .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.jd-step.active .step-label,
.jd-step.completed .step-label {
    color: #667eea;
}

.jd-step-line {
    height: 2px;
    width: 80px;
    background: #e5e7eb;
    margin: 0 10px;
    margin-bottom: 30px;
    transition: background 0.3s ease;
}

.jd-step.completed + .jd-step-line {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Form Steps */
.jd-creator-form {
    position: relative;
}

.jd-form-step {
    display: none;
    animation: fadeInSlide 0.4s ease;
}

.jd-form-step.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jd-step-header {
    text-align: center;
    margin-bottom: 35px;
}

.jd-step-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    
}

.jd-step-header p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* Form Rows */
.jd-form-row {
    margin-bottom: 24px;
}

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

/* Form Groups */
.jd-form-group {
    position: relative;
}

.jd-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.jd-form-group .required {
    color: #ef4444;
}

.jd-form-group input[type="text"],
.jd-form-group input[type="email"],
.jd-form-group select,
.jd-form-group textarea {
    width: 100%;
    padding: 14px 18px;
    padding-right: 45px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #f9fafb;
}

.jd-form-group input:focus,
.jd-form-group select:focus,
.jd-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.jd-form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.jd-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.field-icon {
    position: absolute;
    right: 16px;
    top: 43px;
    font-size: 20px;
    pointer-events: none;
}

/* Navigation Buttons */
.jd-form-navigation {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.jd-btn {
    flex: 1;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.jd-btn-prev {
    background: #f3f4f6;
    color: #374151;
    max-width: 150px;
}

.jd-btn-prev:hover {
    background: #e5e7eb;
    transform: translateX(-2px);
}

.jd-btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.jd-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.jd-btn-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.jd-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.jd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.jd-loading {
    text-align: center;
    padding: 60px 40px;
}

.jd-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jd-loading p {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

/* Result Container */
.jd-result-container {
    margin-top: 40px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 40px;
    border: 2px solid #bae6fd;
}

.jd-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #bae6fd;
}

.jd-result-header h3 {
    margin: 0;
    font-size: 26px;
    color: #0c4a6e;
    font-weight: 700;
}

.jd-copy-btn {
    background: #0ea5e9;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.jd-copy-btn:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.jd-result-content {
    background: white;
    padding: 35px;
    border-radius: 10px;
    line-height: 1.8;
    font-size: 15px;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.jd-result-content h2 {
    font-size: 32px;
    color: #0c4a6e;
    margin-bottom: 20px;
    border-bottom: 3px solid #0ea5e9;
    padding-bottom: 12px;
    font-weight: 700;
}

.jd-result-content h3 {
    font-size: 22px;
    color: #1e40af;
    margin-top: 30px;
    margin-bottom: 14px;
    font-weight: 600;
}

.jd-result-content h4 {
    font-size: 18px;
    color: #374151;
    margin-top: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.jd-result-content ul {
    margin: 16px 0;
    padding-left: 28px;
}

.jd-result-content li {
    margin-bottom: 10px;
    color: #4b5563;
}

.jd-result-content p {
    margin-bottom: 14px;
    color: #4b5563;
}

.jd-result-content strong {
    color: #1f2937;
    font-weight: 600;
}

.jd-result-actions {
    text-align: center;
    margin-top: 30px;
}

.jd-new-btn {
    background: #6366f1;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.jd-new-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Error Messages */
.jd-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 16px 24px;
    border-radius: 10px;
    margin-top: 24px;
    text-align: center;
    border: 2px solid #fca5a5;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jd-creator-container {
        padding: 30px 25px;
    }

    .jd-creator-title {
        font-size: 28px;
    }

    .jd-progress-steps {
        padding: 0 10px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .step-label {
        font-size: 11px;
    }

    .jd-step-line {
        width: 40px;
        margin: 0 5px;
    }

    .jd-row-2col {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .jd-form-navigation {
        flex-direction: column;
    }

    .jd-btn-prev {
        max-width: 100%;
        order: 2;
    }

    .jd-btn-next,
    .jd-btn-submit {
        order: 1;
    }

    .jd-result-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .jd-result-content {
        padding: 25px;
    }

    .field-icon {
        display: none;
    }
}

@media (max-width: 480px) {
    .jd-creator-wrapper {
        padding: 10px;
    }

    .jd-creator-container {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .jd-creator-title {
        font-size: 24px;
    }

    .jd-step-header h3 {
        font-size: 20px;
    }
}