/* Solve Form Styles */
.solve-form {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    /* Ensure it's completely removed from grid flow */
    grid-area: unset !important;
}

.solve-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(2px);
}

.solve-form-container {
    position: relative;
    background: #141418;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 1rem;
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

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

.solve-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px 12px 0 0;
}

.solve-form-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solve-form-header h3 i {
    color: #5b86e5;
}

.solve-form-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.solve-form-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.solve-form-content {
    padding: 1.5rem;
}

.solve-form .form-group {
    margin-bottom: 1.5rem;
}

.solve-form .form-group:last-of-type {
    margin-bottom: 1rem;
}

.solve-form label {
    display: block;
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.solve-form .form-input,
.solve-form .form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.solve-form .form-input:focus,
.solve-form .form-textarea:focus {
    outline: none;
    border-color: #5b86e5;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(91, 134, 229, 0.1);
}

.solve-form .form-input::placeholder,
.solve-form .form-textarea::placeholder {
    color: #999;
}

.solve-form .form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.solve-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.solve-form .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
}

.solve-form .btn-primary {
    background: #5b86e5;
    color: white;
}

.solve-form .btn-primary:hover:not(:disabled) {
    background: #4a75d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 134, 229, 0.3);
}

.solve-form .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.solve-form .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.solve-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Solve button state when solution is provided */
.thread__action[data-action="provide-solution"].has-solution {
    background: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #28a745;
}

.thread__action[data-action="provide-solution"].has-solution:hover {
    background: rgba(40, 167, 69, 0.3);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background: rgba(40, 167, 69, 0.9);
    border: 1px solid #28a745;
    color: #fff;
}

.notification-error {
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid #dc3545;
    color: #fff;
}

.notification-info {
    background: rgba(91, 134, 229, 0.9);
    border: 1px solid #5b86e5;
    color: #fff;
}

.notification-content {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: auto;
    padding: 0.25rem;
    border-radius: 3px;
    transition: background 0.2s;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* Responsive design */
@media (max-width: 768px) {
    .solve-form {
        margin: 0.5rem 0;
    }
    
    .solve-form-header {
        padding: 1rem;
    }
    
    .solve-form-content {
        padding: 1rem;
    }
    
    .solve-form .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .solve-form .btn {
        width: 100%;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
