/* Custom styles for AI Agent Project Builder */

/* Welcome Section Styles */
.welcome-section {
    min-height: 80vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.welcome-section .container {
    position: relative;
    z-index: 2;
}

.hero-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.cta-section .btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.cta-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

.cta-section .btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
}

.cta-section .btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: rgba(255, 255, 255, 0.9);
}

.cta-section .btn-outline-primary:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.stats-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    padding: 2rem 1rem 1.5rem;
    backdrop-filter: blur(10px);
}

.stat-item {
    padding: 0.5rem;
}

.stat-item h4 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

/* Animation for welcome section appearance */
.welcome-section {
    animation: fadeInUp 1s ease-out;
}

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

/* Staggered animation for feature cards */
.feature-card:nth-child(1) { animation: slideInLeft 0.8s ease-out 0.2s both; }
.feature-card:nth-child(2) { animation: slideInUp 0.8s ease-out 0.4s both; }
.feature-card:nth-child(3) { animation: slideInRight 0.8s ease-out 0.6s both; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive adjustments for welcome section */
@media (max-width: 768px) {
    .welcome-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .cta-section .btn {
        margin-bottom: 0.5rem;
    }
}

/* Override Bootstrap for better integration */
.navbar-brand {
    font-weight: bold;
    font-size: 1.2rem;
}

/* Custom button styles for consistency */
.btn-group .btn {
    border-radius: 0.375rem;
}

/* Category progress indicators */
.progress {
    background-color: rgba(0,0,0,.1);
}

/* Question status indicators */
.question-text {
    line-height: 1.4;
}

/* Prompt preview area */
.prompt-output {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Collapse toggle styling */
.collapse-toggle {
    color: #6c757d;
    text-decoration: none !important;
}

.collapse-toggle:hover {
    color: #495057;
}

/* Custom spacing */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Responsive button text hiding */
@media (max-width: 767.98px) {
    .navbar-brand span {
        display: none !important;
    }
    
    .btn .d-none.d-md-inline {
        display: none !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error messages - integrate with Bootstrap alerts */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.message-success {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 0.75rem 1rem;
}

.message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 0.75rem 1rem;
}

/* Animation for messages */
.message {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced card styling */
.card {
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Better textarea styling */
.answer-input {
    resize: vertical;
    min-height: 80px;
}

.answer-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Enhanced progress bar styling */
.progress {
    height: 6px;
    border-radius: 3px;
}

.progress-bar {
    border-radius: 3px;
}

/* Badge styling */
.badge {
    font-size: 0.75em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1055;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.175);
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.175);
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    opacity: 0.8;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.modal .close:hover {
    opacity: 1;
}

/* Responsive modal adjustments */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 1rem;
        max-width: none;
    }
}

/* Project Button Standardization */
.project-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: left 0.3s ease;
    z-index: 0;
}

.project-btn:hover::before {
    left: 0;
}

.project-btn:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.project-btn i,
.project-btn span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.project-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Special button variants based on function */
#saveProjectBtn:hover::before {
    background: linear-gradient(45deg, #28a745, #20c997);
}

#deleteProjectBtn:hover::before {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
}

#exportProjectBtn:hover::before {
    background: linear-gradient(45deg, #17a2b8, #007bff);
}

#closeProjectBtn:hover::before {
    background: linear-gradient(45deg, #6c757d, #495057);
}

#copyPromptBtn:hover::before {
    background: linear-gradient(45deg, #fd7e14, #ffc107);
}

#addCategoryBtn:hover::before {
    background: linear-gradient(45deg, #6f42c1, #e83e8c);
}

/* Disable border radius override for button groups */
.btn-group .project-btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .project-btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.btn-group .project-btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Animation for button group */
.btn-group .project-btn:hover {
    z-index: 2;
}

/* Special handling for completion toggle button */
.complete-toggle-btn {
    border-color: #6c757d !important;
}

.complete-toggle-btn:hover::before {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
}

/* When category is marked complete, show different styling */
.complete-toggle-btn.btn-outline-dark[title*="incomplete"]:hover::before {
    background: linear-gradient(45deg, #ffc107, #fd7e14) !important;
}

/* Small button variants */
.btn-sm.project-btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.btn-sm.project-btn:hover {
    transform: translateY(-1px);
}

/* Category and question specific button styles */
.add-question-btn:hover::before {
    background: linear-gradient(45deg, #6f42c1, #e83e8c) !important;
}

.delete-category-btn:hover::before,
.delete-question-btn:hover::before {
    background: linear-gradient(45deg, #dc3545, #e74c3c) !important;
}

.edit-question-btn:hover::before {
    background: linear-gradient(45deg, #17a2b8, #007bff) !important;
}

/* Project Card Styles */
.project-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.project-card:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
}

.project-card.selected {
    background-color: #e7f3ff;
    border-left-color: #0d6efd;
}

.project-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.project-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.project-status.pending {
    background-color: #fff3cd;
    color: #856404;
}

.project-status.in-progress {
    background-color: #cce5ff;
    color: #004085;
}

.project-status.completed {
    background-color: #d1e7dd;
    color: #0a3622;
}

.project-progress {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.project-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.project-card-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-card-actions {
    opacity: 1;
}

/* Delete button styles */
.delete-project-btn {
    opacity: 0.7;
    transition: all 0.2s ease;
    border: none !important;
}

.delete-project-btn:hover {
    opacity: 1;
    background-color: #dc3545 !important;
    color: white !important;
    transform: scale(1.05);
}

.project-card-content {
    cursor: pointer;
}

.project-card-content:hover {
    background: rgba(0, 123, 255, 0.02);
    border-radius: 4px;
}

/* Mobile dropdown button styles */
.dropdown-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: transparent !important;
}

.dropdown-item:disabled:hover {
    background-color: transparent !important;
    color: #6c757d !important;
}

/* Auto-resize textarea styles */
.auto-resize {
    overflow: hidden;
    resize: none;
    min-height: 38px; /* Match input field height */
}

.question-text-input.auto-resize {
    font-weight: 500;
    color: #495057;
    line-height: 1.5;
}

.question-text-input.auto-resize:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Question item styling */
.question-item {
    transition: background-color 0.2s ease;
    border: 1px solid var(--bs-border-color, #dee2e6);
}

.question-item.bg-body-secondary {
    background-color: var(--bs-secondary-bg, #f8f9fa) !important;
}

/* Force zero padding on card body for questions container */
.card-body.no-padding {
    padding: 0 !important;
}