/* PII Exploration Plugin Styles */

/* Main container styles */
.pii-exploration-recommender {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header styles */
.recommender-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.recommender-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 600;
}

.subtitle {
    opacity: 0.95;
    font-size: 16px;
    line-height: 1.5;
}

/* Occupation selection section */
.occupation-selection {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.occupation-selection h3 {
    margin-top: 0;
    color: #1f2937;
    font-size: 20px;
    margin-bottom: 20px;
}

/* User context section */
.user-context-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.context-label {
    display: block;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 10px;
    font-size: 15px;
}

.user-context-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
}

.user-context-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-context-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.context-hint {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #9ca3af;
}

.char-count {
    font-weight: 500;
}

.char-count.warning {
    color: #f59e0b;
}

.char-count.error {
    color: #ef4444;
}

.context-tip {
    font-style: italic;
}

/* User region info */
.user-region-info {
    margin-top: 15px;
    padding: 10px;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1e40af;
}

.region-icon {
    font-size: 16px;
}

.region-label {
    font-weight: 500;
}

.region-value {
    font-weight: 700;
    color: #1d4ed8;
}

.region-note {
    margin-left: auto;
    font-size: 12px;
    font-style: italic;
    color: #60a5fa;
}

/* Occupation count control */
.occupation-count-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.count-label {
    font-weight: 500;
    color: #4b5563;
    min-width: 180px;
}

.count-slider {
    flex: 1;
    max-width: 250px;
}

.count-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.count-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.count-display {
    font-weight: bold;
    color: #667eea;
    font-size: 20px;
    min-width: 30px;
    text-align: center;
}

/* Occupation list */
.pii-exploration-recommender .occupation-list {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.pii-exploration-recommender .occupation-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.occupation-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

.occupation-item.selected {
    background: linear-gradient(to right, #f0f4ff, #ffffff);
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.occupation-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.occupation-info {
    flex: 1;
}

.pii-exploration-recommender .occupation-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 4px;
}

.occupation-fit {
    display: inline-block;
    padding: 3px 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    border-radius: 4px;
}

.occupation-item.selected .occupation-fit {
    background: #667eea;
    color: white;
}

.occupation-rank {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #f9fafb;
    color: #9ca3af;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.occupation-item.selected .occupation-rank {
    background: #667eea;
    color: white;
}

/**
 * ADD THESE STYLES TO YOUR EXISTING assets.css FILE
 * Append to the end of your current CSS
 */

/* Plan Configuration Section - Appears BEFORE generate button */
.plan-configuration {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.config-section {
    margin-bottom: 25px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.config-icon {
    font-size: 20px;
}

/* Duration Selector */
.duration-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.duration-option {
    position: relative;
    cursor: pointer;
}

.duration-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.duration-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
    background: white;
    height: 100%;
}

.duration-option input[type="radio"]:checked + .duration-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.duration-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.duration-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 15px;
}

.duration-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Method Selector - Compact version */
.method-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.method-option {
    position: relative;
    cursor: pointer;
}

.method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.method-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
    align-items: center;
    background: white;
    height: 100%;
}

.method-option input[type="radio"]:checked + .method-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.method-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12);
}

.method-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.method-content {
    flex: 1;
}

.method-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 14px;
}

.method-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Modal */
.pii-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
}

.pii-modal.active {
    display: flex !important;
}

.modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.modal-header h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 20px;
}

.plan-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.plan-meta span {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.plan-duration {
    background: #dbeafe;
    color: #1e40af;
}

.plan-method {
    background: #f3e8ff;
    color: #7c3aed;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    color: #9ca3af;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #374151;
}

.modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Plan Preview Grid */
.plan-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Week Dropzone with Collapsible Content */
.week-dropzone {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.week-header-toggle {
    margin: 0;
    padding: 15px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.week-header-toggle:hover {
    background: #f3f4f6;
}

.week-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-count {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.toggle-icon {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s;
}

/* Week Activities - Collapsible */
.week-activities {
    padding: 0 15px 15px 15px;
    min-height: 60px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.week-activities.collapsed {
    max-height: 0;
    padding: 0 15px;
}

/* Activity Cards - Simplified (no badges in preview) */
.draggable-activity {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s;
}

.draggable-activity:last-child {
    margin-bottom: 0;
}

.draggable-activity:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.draggable-activity.ui-sortable-helper {
    opacity: 0.8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.activity-title {
    font-weight: 500;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
}

.empty-week {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px 10px;
    font-size: 12px;
}

/* Drag-drop Placeholders */
.week-placeholder {
    background: #e0e7ff;
    border: 2px dashed #667eea;
    border-radius: 8px;
    height: 100px;
}

.activity-placeholder {
    background: #fef3c7;
    border: 2px dashed #f59e0b;
    border-radius: 6px;
    height: 40px;
    margin-bottom: 8px;
}

.more-weeks-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .duration-selector,
    .method-selector {
        grid-template-columns: 1fr;
    }
    
    .plan-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Generate button */
.generate-btn-container {
    text-align: center;
    margin: 30px 0;
}

.pii-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pii-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pii-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pii-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-icon {
    font-size: 20px;
}

/* Activities section */
.activities-container {
    display: none;
}

.activities-container.active {
    display: block;
}

.occupation-activities {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.occupation-activities h4 {
    color: #1f2937;
    font-size: 18px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.occupation-badge {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.activities-grid {
    display: grid;
    gap: 12px;
}

.activity-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.activity-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.activity-item.selected {
    background: linear-gradient(to right, #f0f4ff, #ffffff);
    border-color: #667eea;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.15);
}

.activity-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.activity-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.activity-title {
    flex: 1;
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.4;
}

.activity-description {
    margin-left: 30px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.ai-recommended {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Selection summary */
.selection-summary {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    display: none;
}

.selection-summary.active {
    display: block;
}

.selection-summary p {
    margin: 0;
    color: #0c4a6e;
    font-weight: 500;
}

/* Plan actions */
.plan-actions {
    text-align: center;
    margin-top: 30px;
    display: none;
}

.plan-actions.active {
    display: block;
}

.pii-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.pii-btn-secondary:hover {
    background: #f0f4ff;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    .pii-exploration-recommender {
        padding: 15px;
    }

    .recommender-header h2 {
        font-size: 24px;
    }

    .occupation-count-control {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Planner specific styles */
.pii-planner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Reflection specific styles */
.pii-reflection {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.reflection-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

/* Custom Occupation Section - Enhanced Styling */
.custom-occupation-section {
    background: linear-gradient(135deg, #f6f9fc 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.custom-occupation-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.custom-occupation-section h4 {
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-occupation-section h4::before {
    content: "✨";
    font-size: 20px;
}

.custom-occupation-section p {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.custom-occupation-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.custom-input-group {
    position: relative;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-occupation-input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
}

.custom-input-group::before {
    content: "💼";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
    z-index: 1;
}

.custom-occupation-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #fafaff;
}

.custom-occupation-input:hover:not(:focus) {
    border-color: #9ca3af;
}

.custom-occupation-input::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-size: 14px;
}

/* When input has value */
.custom-occupation-input:not(:placeholder-shown) {
    border-color: #667eea;
    background: #f8f9ff;
}

.custom-input-group:nth-child(2)::before {
    content: "🎯";
}

/* Add validation feedback */
.custom-occupation-input.valid {
    border-color: #10b981;
}

.custom-occupation-input.valid + .input-feedback::before {
    content: "✓";
    color: #10b981;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 18px;
}

/* Character count for custom inputs */
.custom-input-hint {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
    padding: 0 4px;
}

.custom-char-count {
    font-weight: 500;
}

/* Badge for selected custom occupations */
.custom-selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .custom-occupation-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .custom-occupation-section {
        padding: 20px;
    }
}

/* Smooth transitions for better UX */
.custom-occupation-section * {
    transition: all 0.3s ease;
}

/* Optional: Add a subtle animation when section appears */
.custom-occupation-section {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip for help text */
.custom-help-tooltip {
    display: inline-block;
    margin-left: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    cursor: help;
    position: relative;
}

.custom-help-tooltip:hover::after {
    content: "Add occupations not in the main list to explore additional career options";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    max-width: 200px;
    z-index: 1000;
    margin-bottom: 4px;
}

.custom-help-tooltip:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    margin-bottom: -4px;
}

/* CIPS5-style drag and drop CSS */
.week-activities {
    min-height: 150px;
    padding: 15px;
    position: relative;
    /* Allow normal vertical scroll; disable during sort via JS */
    touch-action: pan-y;
}

.week-activities.sorting { 
    /* Disable touch scrolling while sorting */
    touch-action: none; 
}

/* CIPS5 uses 'draggable-activity' class */
.draggable-activity,
.activity-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px;
    margin: 5px 0;
    cursor: move;
    transition: all 0.2s;
    font-size: 13px;
    -webkit-user-select: none;
    user-select: none;
    /* Keep taps responsive, but allow page scroll when not sorting */
    touch-action: manipulation;
}

.draggable-activity:hover,
.activity-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.draggable-activity.dragging,
.activity-item.dragging {
    opacity: 0.5;
}

/* CIPS5 placeholder style */
.ui-sortable-placeholder,
.draggable-activity.ui-sortable-placeholder {
    border: 2px dashed #4CAF50 !important;
    background: rgba(76, 175, 80, 0.1) !important;
    visibility: visible !important;
    height: 60px !important;
}

/* Week containers - CIPS5 style */
.week-dropzone,
.week-container {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    min-height: 150px;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.week-dropzone.drag-over,
.week-container.drag-over {
    background: #e3f2fd;
    border-color: #2196F3;
}

.week-dropzone h4,
.week-header {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.week-count,
.activity-count {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Activity styling */
.activity-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.activity-ing,
.occupation-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-top: 3px;
}

.empty-week {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 6px;
}

/* Final plan display - CIPS5 style */
#generated-plan-display,
#plan-content-area {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 30px auto;
    max-width: 900px;
}

.plan-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 30px;
}

.plan-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.plan-meta {
    color: #666;
    font-size: 14px;
}

.plan-weeks .week-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.week-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.activity-item-plan {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.activity-item-plan:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.activity-header {
    display: flex;
    align-items: flex-start;
}

.activity-check {
    margin-right: 12px;
    margin-top: 3px;
}

.activity-desc {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    line-height: 1.5;
}

.activity-item-plan.completed {
    opacity: 0.7;
    background: #f0f0f0;
}

.activity-item-plan.completed .activity-title {
    text-decoration: line-through;
}

/* Action buttons - CIPS5 style */
.plan-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.cips5-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cips5-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cips5-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cips5-btn-secondary {
    background: #6c757d;
    color: white;
}

.cips5-btn-secondary:hover {
    background: #5a6268;
}

/* Modal styles - CIPS5 exact */
#plan-preview-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

#plan-preview-modal.active {
    display: flex !important;
}

#plan-preview-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

#plan-preview-modal .modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

#plan-preview-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

#plan-preview-modal .modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

#plan-preview-modal .modal-close {
    cursor: pointer;
    font-size: 28px;
    color: #999;
    background: none;
    border: none;
    padding: 0;
}

#plan-preview-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: white;
}

#plan-preview-modal .modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .week-dropzone,
    .week-container {
        margin-bottom: 10px;
    }
    
    .plan-actions {
        flex-direction: column;
    }
    
    .cips5-btn {
        width: 100%;
        justify-content: center;
    }
}


/**
 * ADD THESE STYLES TO YOUR EXISTING assets.css FILE
 * These styles support the hybrid duration/distribution system
 */

/* Plan Configuration Section */
.plan-configuration {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.config-section {
    margin-bottom: 30px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
}

.config-icon {
    font-size: 20px;
}

/* Duration Selector */
.duration-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.duration-option {
    position: relative;
    cursor: pointer;
}

.duration-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.duration-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
    background: white;
    height: 100%;
}

.duration-option input[type="radio"]:checked + .duration-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.duration-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.duration-label {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 15px;
}

.duration-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Method Selector */
.method-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.method-option {
    position: relative;
    cursor: pointer;
}

.method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.method-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px;
    transition: all 0.2s;
    display: flex;
    gap: 15px;
    align-items: start;
    background: white;
}

.method-option input[type="radio"]:checked + .method-card {
    border-color: #667eea;
    background: #f0f4ff;
}

.method-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.12);
}

.method-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.method-content {
    flex: 1;
}

.method-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 15px;
}

.method-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 8px;
}

.method-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.method-tags span {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.tag-pro {
    background: #d1fae5;
    color: #065f46;
}

.tag-con {
    background: #fee2e2;
    color: #991b1b;
}

/* Modal Enhancements */
.pii-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pii-modal.active {
    display: flex !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.modal-header h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 20px;
}

.plan-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.plan-meta span {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.plan-duration {
    background: #dbeafe;
    color: #1e40af;
}

.plan-method {
    background: #f3e8ff;
    color: #7c3aed;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    color: #9ca3af;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #374151;
}

.modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Plan Preview Grid */
.plan-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.week-dropzone {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    min-height: 120px;
}

.week-dropzone h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.week-badges {
    display: flex;
    gap: 6px;
}

.week-count {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.week-hours {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Activity Cards */
.draggable-activity {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s;
}

.draggable-activity:last-child {
    margin-bottom: 0;
}

.draggable-activity:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.activity-title {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.activity-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.activity-meta span {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: capitalize;
}

.activity-type {
    background: #dbeafe;
    color: #1e40af;
}

.activity-difficulty {
    font-weight: 600;
}

.difficulty-easy {
    background: #d1fae5;
    color: #065f46;
}

.difficulty-medium {
    background: #fef3c7;
    color: #92400e;
}

.difficulty-hard {
    background: #fee2e2;
    color: #991b1b;
}

.activity-duration {
    background: #e5e7eb;
    color: #374151;
}

.empty-week {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px 10px;
    font-size: 12px;
}

.more-weeks-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .duration-selector {
        grid-template-columns: 1fr;
    }
    
    .plan-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

.duration-configuration {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.config-section {
    margin-bottom: 30px;
}

.config-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #2c3e50;
}

.duration-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.duration-option {
    cursor: pointer;
}

.duration-option input[type="radio"] {
    display: none;
}

.duration-card {
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.duration-option input[type="radio"]:checked + .duration-card {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.duration-view-type {
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

.config-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}


/* Preview modal activity card with toggle */
.draggable-activity {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s;
}

.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.activity-preview-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
    font-size: 12px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.activity-preview-toggle:hover {
    color: #1f2937;
}

.toggle-icon-preview {
    display: inline-block;
    transition: transform 0.2s;
}

/* Preview details section */
.activity-preview-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.activity-preview-details.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    border-top: none;
}

.preview-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 6px 0;
}

.preview-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-meta-item {
    font-size: 11px;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Hide details when dragging */
.draggable-activity.ui-sortable-helper .activity-preview-details,
.draggable-activity.dragging .activity-preview-details {
    display: none !important;
}


