/* Project Section Fixes - High Priority Override */
/* This file ensures consistent styling for all project cards, including dynamically created ones */

/* Projects Section Container */
.editor-section-card {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    margin-bottom: 2rem !important;
    padding: 1.5rem 2rem !important;
}

/* Project Card Base Styling */
.project-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    margin-bottom: 1.5rem !important;
    background: #f9fafb !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
    transition: box-shadow 0.2s !important;
    overflow: hidden !important;
}

.project-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}

/* Project Card Header */
.project-card .card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: transparent !important;
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 1rem 1.5rem !important;
    margin-bottom: 0 !important;
}

/* Project Card Body */
.project-card .card-body {
    padding: 1.5rem !important;
    background: #fff !important;
}

/* Card Title */
.card-title {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
}

/* Form Groups */
.project-card .form-group {
    margin-bottom: 1.5rem !important;
}

.project-card .form-group:last-child {
    margin-bottom: 0 !important;
}

/* Form Labels */
.project-card .form-label {
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    font-size: 0.9rem !important;
}

.project-card .form-label.required::after {
    content: " *" !important;
    color: #dc2626 !important;
    font-weight: 600 !important;
}

/* Form Inputs */
.project-card .form-input, 
.project-card .form-textarea, 
.project-card textarea, 
.project-card input[type="text"], 
.project-card input[type="url"] {
    width: 100% !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    background: #fff !important;
    margin-bottom: 0 !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
}

.project-card .form-input:focus, 
.project-card .form-textarea:focus, 
.project-card textarea:focus, 
.project-card input[type="text"]:focus, 
.project-card input[type="url"]:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    outline: none !important;
}

/* Textarea Specific */
.project-card textarea {
    min-height: 120px !important;
    resize: vertical !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

/* Form Rows */
.project-card .form-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

.project-card .date-location-row {
    margin-bottom: 1.5rem !important;
}

/* Date Groups */
.project-card .date-group {
    width: 100% !important;
}

.project-card .date-selectors {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.project-card .date-range-label {
    font-weight: 500 !important;
    color: #374151 !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
}

.project-card .date-selector {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
}

.project-card .date-select {
    flex: 1 !important;
    padding: 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #fff !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.project-card .date-select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    outline: none !important;
}

/* Form Help Section */
.project-card .form-help {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 0.75rem !important;
    padding: 0.75rem !important;
    background: #f8fafc !important;
    border-radius: 6px !important;
    border-left: 3px solid #6366f1 !important;
}

.project-card .form-tip {
    color: #6b7280 !important;
    font-size: 0.85rem !important;
    margin-right: 1rem !important;
    flex: 1 !important;
}

/* Buttons */
.project-card .btn {
    border-radius: 6px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    transition: background 0.2s, color 0.2s !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-height: 36px !important;
}

.project-card .btn-primary {
    background: #6366f1 !important;
    color: #fff !important;
}

.project-card .btn-primary:hover {
    background: #4f46e5 !important;
}

.project-card .btn-secondary {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.project-card .btn-secondary:hover {
    background: #e5e7eb !important;
}

.project-card .btn-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.project-card .btn-danger:hover {
    background: #fecaca !important;
}

.project-card .btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.8rem !important;
    min-height: 32px !important;
}

.project-card .ai-suggest-btn {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    white-space: nowrap !important;
}

.project-card .ai-suggest-btn:hover {
    background: #e5e7eb !important;
}

/* Add Item Button */
.add-item-btn {
    margin-top: 1.5rem !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    padding: 1rem 0 !important;
    background: #10b981 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: background 0.2s !important;
}

.add-item-btn:hover {
    background: #059669 !important;
}

.add-item-btn .btn-icon {
    font-size: 1.3rem !important;
    margin-right: 0.5rem !important;
}

/* Mobile Responsive Overrides */
@media (max-width: 700px) {
    .editor-section-card {
        padding: 1rem !important;
    }
    
    .project-card .card-header {
        padding: 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .project-card .card-body {
        padding: 1rem !important;
    }
    
    .project-card .form-help {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .project-card .ai-suggest-btn {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .project-card .date-selector {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .project-card .date-select {
        width: 100% !important;
    }
}

/* Ensure styles apply to dynamically created cards */
.card.project-card {
    /* Force inheritance of all project card styles */
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    margin-bottom: 1.5rem !important;
    background: #f9fafb !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
    transition: box-shadow 0.2s !important;
    overflow: hidden !important;
}

/* Override any conflicting mobile styles */
@media (max-width: 768px) {
    .project-card {
        /* Ensure our styles take precedence over mobile CSS */
        border: 1px solid #e5e7eb !important;
        border-radius: 10px !important;
        margin-bottom: 1.5rem !important;
        background: #f9fafb !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
        overflow: hidden !important;
    }
    
    .project-card .card-body {
        padding: 1rem !important;
        background: #fff !important;
    }
    
    .project-card .form-input, 
    .project-card .form-textarea, 
    .project-card textarea, 
    .project-card input[type="text"], 
    .project-card input[type="url"] {
        padding: 0.75rem 1rem !important;
        border: 1px solid #d1d5db !important;
        border-radius: 8px !important;
        background: #fff !important;
        min-height: 44px !important;
    }
} 